1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include <xmlsec/xmlsec_init.hxx>
12 #include <com/sun/star/uno/RuntimeException.hpp>
14 #include <xmlsec/xmlstreamio.hxx>
15 #include <xmlsec-wrapper.h>
17 using namespace css::uno
;
19 XSECXMLSEC_DLLPUBLIC
void initXmlSec()
22 if( xmlSecInit() < 0 ) {
23 throw RuntimeException() ;
26 //Init xmlsec crypto engine library
27 if( xmlSecCryptoInit() < 0 ) {
29 throw RuntimeException() ;
32 //Enable external stream handlers
33 if( xmlEnableStreamInputCallbacks() < 0 ) {
34 xmlSecCryptoShutdown() ;
36 throw RuntimeException() ;
40 XSECXMLSEC_DLLPUBLIC
void deInitXmlSec()
42 xmlDisableStreamInputCallbacks();
43 xmlSecCryptoShutdown();
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */