Kaydet (Commit) c667669c authored tarafından Thorsten Behrens's avatar Thorsten Behrens

gpg4libre: fix windows build

Change-Id: I66b809bbf2f5ab5d9c1eaf40ba8f2c91f4bc8007
üst cae5f2a5
...@@ -109,7 +109,9 @@ $(eval $(call gb_Rdb_add_components,services,\ ...@@ -109,7 +109,9 @@ $(eval $(call gb_Rdb_add_components,services,\
xmloff/util/xo \ xmloff/util/xo \
xmlscript/util/xmlscript \ xmlscript/util/xmlscript \
$(if $(ENABLE_NSS), \ $(if $(ENABLE_NSS), \
xmlsecurity/util/xsec_gpg \ $(if $(filter-out WNT MACOSX ANDROID IOS,$(OS)), \
xmlsecurity/util/xsec_gpg \
) \
xmlsecurity/util/xmlsecurity \ xmlsecurity/util/xmlsecurity \
xmlsecurity/util/xsec_xmlsec$(if $(filter WNT,$(OS)),.windows)) \ xmlsecurity/util/xsec_xmlsec$(if $(filter WNT,$(OS)),.windows)) \
$(if $(ENABLE_COINMP), \ $(if $(ENABLE_COINMP), \
......
...@@ -9,9 +9,7 @@ ...@@ -9,9 +9,7 @@
$(eval $(call gb_Library_Library,xsec_gpg)) $(eval $(call gb_Library_Library,xsec_gpg))
ifneq ($(OS),WNT)
$(eval $(call gb_Library_set_componentfile,xsec_gpg,xmlsecurity/util/xsec_gpg)) $(eval $(call gb_Library_set_componentfile,xsec_gpg,xmlsecurity/util/xsec_gpg))
endif
$(eval $(call gb_Library_set_include,xsec_gpg,\ $(eval $(call gb_Library_set_include,xsec_gpg,\
$$(INCLUDE) \ $$(INCLUDE) \
......
...@@ -24,11 +24,13 @@ ...@@ -24,11 +24,13 @@
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp> #include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp> #include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
#include <xsecxmlsecdllapi.h>
// Only used for logging // Only used for logging
void setErrorRecorder(); XSECXMLSEC_DLLPUBLIC void setErrorRecorder();
//ToDo //ToDo
//void setErrorRecorder(const css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate >& xTemplate); //void setErrorRecorder(const css::uno::Reference< css::xml::crypto::XXMLEncryptionTemplate >& xTemplate);
void clearErrorRecorder(); XSECXMLSEC_DLLPUBLIC void clearErrorRecorder();
#endif #endif
......
...@@ -23,14 +23,16 @@ ...@@ -23,14 +23,16 @@
#include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/xml/crypto/XUriBinding.hpp> #include <com/sun/star/xml/crypto/XUriBinding.hpp>
#include <xsecxmlsecdllapi.h>
int xmlEnableStreamInputCallbacks() ; int xmlEnableStreamInputCallbacks() ;
void xmlDisableStreamInputCallbacks() ; void xmlDisableStreamInputCallbacks() ;
int xmlRegisterStreamInputCallbacks( XSECXMLSEC_DLLPUBLIC int xmlRegisterStreamInputCallbacks(
css::uno::Reference< css::xml::crypto::XUriBinding >& aUriBinding css::uno::Reference< css::xml::crypto::XUriBinding >& aUriBinding
) ; ) ;
int xmlUnregisterStreamInputCallbacks() ; XSECXMLSEC_DLLPUBLIC int xmlUnregisterStreamInputCallbacks() ;
#endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_XMLSTREAMIO_HXX #endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_XMLSTREAMIO_HXX
......
...@@ -24,7 +24,7 @@ using namespace ::com::sun::star::registry; ...@@ -24,7 +24,7 @@ using namespace ::com::sun::star::registry;
extern "C" extern "C"
{ {
void* SAL_CALL gpg_component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* /*pRegistryKey*/ ) SAL_DLLPUBLIC_EXPORT void* SAL_CALL xsec_gpg_component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* /*pRegistryKey*/ )
{ {
void* pRet = nullptr; void* pRet = nullptr;
Reference< XSingleServiceFactory > xFactory ; Reference< XSingleServiceFactory > xFactory ;
......
...@@ -112,9 +112,9 @@ SAL_CALL XMLSignature_GpgImpl::generate( ...@@ -112,9 +112,9 @@ SAL_CALL XMLSignature_GpgImpl::generate(
// Calculate digest for all references // Calculate digest for all references
xmlNodePtr cur = xmlSecGetNextElementNode(pNode->children); xmlNodePtr cur = xmlSecGetNextElementNode(pNode->children);
if( cur != NULL ) if( cur != nullptr )
cur = xmlSecGetNextElementNode(cur->children); cur = xmlSecGetNextElementNode(cur->children);
while( cur != NULL ) while( cur != nullptr )
{ {
// some of those children I suppose should be reference elements // some of those children I suppose should be reference elements
if( xmlSecCheckNodeName(cur, xmlSecNodeReference, xmlSecDSigNs) ) if( xmlSecCheckNodeName(cur, xmlSecNodeReference, xmlSecDSigNs) )
...@@ -122,7 +122,7 @@ SAL_CALL XMLSignature_GpgImpl::generate( ...@@ -122,7 +122,7 @@ SAL_CALL XMLSignature_GpgImpl::generate(
xmlSecDSigReferenceCtxPtr pDsigRefCtx = xmlSecDSigReferenceCtxPtr pDsigRefCtx =
xmlSecDSigReferenceCtxCreate(pDsigCtx, xmlSecDSigReferenceCtxCreate(pDsigCtx,
xmlSecDSigReferenceOriginSignedInfo); xmlSecDSigReferenceOriginSignedInfo);
if(pDsigRefCtx == NULL) if(pDsigRefCtx == nullptr)
throw RuntimeException(); throw RuntimeException();
// add this one to the list // add this one to the list
...@@ -152,9 +152,9 @@ SAL_CALL XMLSignature_GpgImpl::generate( ...@@ -152,9 +152,9 @@ SAL_CALL XMLSignature_GpgImpl::generate(
// ------------------------------------------------------- // -------------------------------------------------------
// run the transformations // run the transformations
xmlSecNodeSetPtr nodeset = NULL; xmlSecNodeSetPtr nodeset = nullptr;
nodeset = xmlSecNodeSetGetChildren(pNode->doc, pNode, 1, 0); nodeset = xmlSecNodeSetGetChildren(pNode->doc, pNode, 1, 0);
if(nodeset == NULL) if(nodeset == nullptr)
throw RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol."); throw RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol.");
if( xmlSecTransformCtxXmlExecute(&(pDsigCtx->transformCtx), nodeset) < 0 ) if( xmlSecTransformCtxXmlExecute(&(pDsigCtx->transformCtx), nodeset) < 0 )
......
...@@ -48,12 +48,12 @@ void errorCallback(const char* file, ...@@ -48,12 +48,12 @@ void errorCallback(const char* file,
SAL_WARN("xmlsecurity.xmlsec", file << ":" << line << ": " << func << "() '" << pErrorObject << "' '" << pErrorSubject << "' " << reason << " '" << pMsg << "'" << systemErrorString); SAL_WARN("xmlsecurity.xmlsec", file << ":" << line << ": " << func << "() '" << pErrorObject << "' '" << pErrorSubject << "' " << reason << " '" << pMsg << "'" << systemErrorString);
} }
SAL_DLLPUBLIC_EXPORT void setErrorRecorder() XSECXMLSEC_DLLPUBLIC void setErrorRecorder()
{ {
xmlSecErrorsSetCallback(errorCallback); xmlSecErrorsSetCallback(errorCallback);
} }
SAL_DLLPUBLIC_EXPORT void clearErrorRecorder() XSECXMLSEC_DLLPUBLIC void clearErrorRecorder()
{ {
xmlSecErrorsSetCallback(nullptr); xmlSecErrorsSetCallback(nullptr);
} }
......
...@@ -24,11 +24,10 @@ ...@@ -24,11 +24,10 @@
#include "xmlencryption_mscryptimpl.hxx" #include "xmlencryption_mscryptimpl.hxx"
#include "xmlsec/xmldocumentwrapper_xmlsecimpl.hxx" #include "xmlsec/xmldocumentwrapper_xmlsecimpl.hxx"
#include "xmlsec/xmlelementwrapper_xmlsecimpl.hxx"
#include "xmlelementwrapper_xmlsecimpl.hxx" #include "xmlsec/errorcallback.hxx"
#include "securityenvironment_mscryptimpl.hxx" #include "securityenvironment_mscryptimpl.hxx"
#include "errorcallback.hxx"
#include "xmlsec-wrapper.h" #include "xmlsec-wrapper.h"
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
#include "securityenvironment_mscryptimpl.hxx" #include "securityenvironment_mscryptimpl.hxx"
#include "xmlsecuritycontext_mscryptimpl.hxx" #include "xmlsecuritycontext_mscryptimpl.hxx"
#include "xmlstreamio.hxx" #include "xmlsec/xmlstreamio.hxx"
#include "xmlsec/mscrypto/akmngr.h"
#include "xmlsec-wrapper.h" #include "xmlsec-wrapper.h"
#include "xmlsec/mscrypto/akmngr.h"
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::lang ; using namespace ::com::sun::star::lang ;
......
...@@ -21,12 +21,15 @@ ...@@ -21,12 +21,15 @@
#include <rtl/uuid.h> #include <rtl/uuid.h>
#include <com/sun/star/xml/crypto/SecurityOperationStatus.hpp> #include <com/sun/star/xml/crypto/SecurityOperationStatus.hpp>
#include "xmlsignature_mscryptimpl.hxx" #include "xmlsignature_mscryptimpl.hxx"
#include "xmlsec/xmldocumentwrapper_xmlsecimpl.hxx"
#include "xmlelementwrapper_xmlsecimpl.hxx"
#include "securityenvironment_mscryptimpl.hxx" #include "securityenvironment_mscryptimpl.hxx"
#include "xmlstreamio.hxx"
#include "errorcallback.hxx" #include "xmlsec/xmldocumentwrapper_xmlsecimpl.hxx"
#include "xmlsec/xmlelementwrapper_xmlsecimpl.hxx"
#include "xmlsec/xmlstreamio.hxx"
#include "xmlsec/errorcallback.hxx"
#include "xmlsec-wrapper.h" #include "xmlsec-wrapper.h"
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp> #include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp> #include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#include "xsecxmlsecdllapi.h" class XMLSignature_NssImpl : public ::cppu::WeakImplHelper<
class XSECXMLSEC_DLLPUBLIC XMLSignature_NssImpl : public ::cppu::WeakImplHelper<
css::xml::crypto::XXMLSignature , css::xml::crypto::XXMLSignature ,
css::lang::XServiceInfo > css::lang::XServiceInfo >
{ {
......
...@@ -180,7 +180,7 @@ int xmlEnableStreamInputCallbacks() ...@@ -180,7 +180,7 @@ int xmlEnableStreamInputCallbacks()
return 0 ; return 0 ;
} }
SAL_DLLPUBLIC_EXPORT int xmlRegisterStreamInputCallbacks( XSECXMLSEC_DLLPUBLIC int xmlRegisterStreamInputCallbacks(
css::uno::Reference< css::xml::crypto::XUriBinding >& aUriBinding css::uno::Reference< css::xml::crypto::XUriBinding >& aUriBinding
) { ) {
if( !( enableXmlStreamIO & XMLSTREAMIO_INITIALIZED ) ) { if( !( enableXmlStreamIO & XMLSTREAMIO_INITIALIZED ) ) {
...@@ -197,7 +197,7 @@ SAL_DLLPUBLIC_EXPORT int xmlRegisterStreamInputCallbacks( ...@@ -197,7 +197,7 @@ SAL_DLLPUBLIC_EXPORT int xmlRegisterStreamInputCallbacks(
return 0 ; return 0 ;
} }
SAL_DLLPUBLIC_EXPORT int xmlUnregisterStreamInputCallbacks() XSECXMLSEC_DLLPUBLIC int xmlUnregisterStreamInputCallbacks()
{ {
if( ( enableXmlStreamIO & XMLSTREAMIO_REGISTERED ) ) { if( ( enableXmlStreamIO & XMLSTREAMIO_REGISTERED ) ) {
//Clear the uri-stream binding //Clear the uri-stream binding
......
...@@ -20,6 +20,6 @@ ...@@ -20,6 +20,6 @@
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="xsec_gpg" xmlns="http://openoffice.org/2010/uno-components"> prefix="xsec_gpg" xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLSignature_GpgImpl"> <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLSignature_GpgImpl">
<service name="com.sun.star.xml.crypto.XMLSignature"/> <service name="com.sun.star.xml.crypto.XMLSignature2"/>
</implementation> </implementation>
</component> </component>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment