summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/xmlsec
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2017-05-21 14:28:57 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-06-21 20:58:27 +0200
commit13d13b1444bd98299b66c85d269390cbdf25282f (patch)
treee372c847c3049e2c25a2146806d88da5ed9295cc /xmlsecurity/source/xmlsec
parentcc5703885ad52526e484d8172e08406b2925faf6 (diff)
gpg4libre: share static xmlsec lib between nss and gpg
In the end, the gpgme implementation uses enough of xmlsec functionality that splitting those (and ending up with two copies) was just not worth it. Change-Id: Ida87c848e4e6a770e3c697add9ceb589a9ec3930
Diffstat (limited to 'xmlsecurity/source/xmlsec')
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/xmlstreamio.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/xsec_xmlsec.cxx7
3 files changed, 12 insertions, 3 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
index 6b7a78b1e6a1..d5ba8a38f949 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
@@ -37,6 +37,7 @@ using ::com::sun::star::xml::crypto::XXMLSecurityContext ;
XMLSecurityContext_NssImpl::XMLSecurityContext_NssImpl()
: m_nDefaultEnvIndex(-1)
{
+#if 0
//Init xmlsec library
if( xmlSecInit() < 0 ) {
throw RuntimeException() ;
@@ -54,13 +55,16 @@ XMLSecurityContext_NssImpl::XMLSecurityContext_NssImpl()
xmlSecShutdown() ;
throw RuntimeException() ;
}
+#endif
}
XMLSecurityContext_NssImpl::~XMLSecurityContext_NssImpl()
{
+#if 0
xmlDisableStreamInputCallbacks() ;
xmlSecCryptoShutdown() ;
xmlSecShutdown() ;
+#endif
}
sal_Int32 SAL_CALL XMLSecurityContext_NssImpl::addSecurityEnvironment(
diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
index 6faf711c181b..32d86269cd7e 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
@@ -145,7 +145,7 @@ int xmlStreamClose( void * context )
return 0 ;
}
-int xmlEnableStreamInputCallbacks()
+XSECXMLSEC_DLLPUBLIC int xmlEnableStreamInputCallbacks()
{
if( !( enableXmlStreamIO & XMLSTREAMIO_INITIALIZED ) ) {
@@ -210,7 +210,7 @@ XSECXMLSEC_DLLPUBLIC int xmlUnregisterStreamInputCallbacks()
return 0 ;
}
-void xmlDisableStreamInputCallbacks() {
+XSECXMLSEC_DLLPUBLIC void xmlDisableStreamInputCallbacks() {
xmlUnregisterStreamInputCallbacks() ;
enableXmlStreamIO &= ~XMLSTREAMIO_INITIALIZED ;
}
diff --git a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
index 99738064c09f..dd793295baa1 100644
--- a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
+++ b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
@@ -26,6 +26,7 @@
#include "xmlsec/xmlelementwrapper_xmlsecimpl.hxx"
#include "xmlsec/xmldocumentwrapper_xmlsecimpl.hxx"
#include "xsec_xmlsec.hxx"
+#include "xmlsignature_gpgimpl.hxx"
using namespace ::cppu;
using namespace ::com::sun::star::uno;
@@ -40,7 +41,11 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL xsec_xmlsec_component_getFactory( const sal_
Reference< XInterface > xFactory ;
if( pImplName != nullptr ) {
- if( XMLElementWrapper_XmlSecImpl_getImplementationName().equalsAscii( pImplName ) )
+ if( XMLSignature_GpgImpl::impl_getImplementationName().equalsAscii( pImplName ) )
+ {
+ xFactory = XMLSignature_GpgImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+ }
+ else if( XMLElementWrapper_XmlSecImpl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = cppu::createSingleComponentFactory(
XMLElementWrapper_XmlSecImpl_createInstance,