From: Scott Cantor Date: Fri, 2 Mar 2007 02:37:08 +0000 (+0000) Subject: Moved key/cred resolution classes out of xmlsig namespace. X-Git-Tag: 1.0-alpha1~84 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=085daff2d0c1d078f006f23808b4092130110eb9 Moved key/cred resolution classes out of xmlsig namespace. --- diff --git a/configure.ac b/configure.ac index b81dbb5..568a529 100644 --- a/configure.ac +++ b/configure.ac @@ -186,7 +186,7 @@ int i = 0; #error cannot use version 2.6.0 #endif])], [AC_MSG_RESULT(OK)], - [AC_MSG_FAILURE([Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use special 2.6.1 tarball provided by Shibboleth Project])]) + [AC_MSG_FAILURE([Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use a newer version])]) AC_TRY_LINK( [#include ], [xercesc::XMLPlatformUtils::Initialize()], diff --git a/xmltooling/Makefile.am b/xmltooling/Makefile.am index b4a5c80..d1d8467 100644 --- a/xmltooling/Makefile.am +++ b/xmltooling/Makefile.am @@ -58,8 +58,12 @@ ioinclude_HEADERS = \ secinclude_HEADERS = \ security/AbstractPKIXTrustEngine.h \ + security/CachingKeyResolver.h \ security/ChainingTrustEngine.h \ + security/CredentialResolver.h \ security/KeyInfoSource.h \ + security/KeyResolver.h \ + security/OpenSSLCredentialResolver.h \ security/TrustEngine.h \ security/X509TrustEngine.h \ security/OpenSSLTrustEngine.h \ @@ -67,12 +71,8 @@ secinclude_HEADERS = \ security/OpenSSLCryptoX509CRL.h siginclude_HEADERS = \ - signature/CachingKeyResolver.h \ signature/ContentReference.h \ - signature/CredentialResolver.h \ signature/KeyInfo.h \ - signature/KeyResolver.h \ - signature/OpenSSLCredentialResolver.h \ signature/Signature.h \ signature/SignatureValidator.h @@ -110,13 +110,13 @@ xmlsec_sources = \ security/impl/TrustEngine.cpp \ security/impl/AbstractPKIXTrustEngine.cpp \ security/impl/ChainingTrustEngine.cpp \ + security/impl/CredentialResolver.cpp \ + security/impl/FilesystemCredentialResolver.cpp \ + security/impl/InlineKeyResolver.cpp \ security/impl/ExplicitKeyTrustEngine.cpp \ + security/impl/KeyResolver.cpp \ security/impl/XSECCryptoX509CRL.cpp \ security/impl/OpenSSLCryptoX509CRL.cpp \ - signature/impl/CredentialResolver.cpp \ - signature/impl/FilesystemCredentialResolver.cpp \ - signature/impl/InlineKeyResolver.cpp \ - signature/impl/KeyResolver.cpp \ signature/impl/SignatureValidator.cpp \ signature/impl/XMLSecSignatureImpl.cpp else diff --git a/xmltooling/XMLToolingConfig.cpp b/xmltooling/XMLToolingConfig.cpp index 305bd39..4a686fe 100644 --- a/xmltooling/XMLToolingConfig.cpp +++ b/xmltooling/XMLToolingConfig.cpp @@ -27,7 +27,7 @@ #include "impl/UnknownElement.h" #include "security/TrustEngine.h" #include "security/OpenSSLCryptoX509CRL.h" -#include "signature/CredentialResolver.h" +#include "security/CredentialResolver.h" #include "soap/SOAP.h" #include "soap/SOAPTransport.h" #include "util/NDC.h" diff --git a/xmltooling/XMLToolingConfig.h b/xmltooling/XMLToolingConfig.h index 44eba99..7a333d6 100644 --- a/xmltooling/XMLToolingConfig.h +++ b/xmltooling/XMLToolingConfig.h @@ -28,9 +28,12 @@ #include #ifndef XMLTOOLING_NO_XMLSEC -namespace xmlsignature { +namespace xmltooling { class XMLTOOL_API CredentialResolver; + class XMLTOOL_API KeyInfoSource; class XMLTOOL_API KeyResolver; + class XMLTOOL_API TrustEngine; + class XMLTOOL_API XSECCryptoX509CRL; }; #endif @@ -45,9 +48,6 @@ namespace xmltooling { class XMLTOOL_API SOAPTransport; class XMLTOOL_API StorageService; class XMLTOOL_API TemplateEngine; - class XMLTOOL_API TrustEngine; - class XMLTOOL_API KeyInfoSource; - class XMLTOOL_API XSECCryptoX509CRL; /** * Singleton object that manages library startup/shutdown.configuration. @@ -197,12 +197,12 @@ namespace xmltooling { /** * Manages factories for KeyResolver plugins. */ - PluginManager KeyResolverManager; + PluginManager KeyResolverManager; /** * Manages factories for CredentialResolver plugins. */ - PluginManager CredentialResolverManager; + PluginManager CredentialResolverManager; /** * Manages factories for TrustEngine plugins. diff --git a/xmltooling/encryption/Decrypter.h b/xmltooling/encryption/Decrypter.h index 49b3875..5abac55 100644 --- a/xmltooling/encryption/Decrypter.h +++ b/xmltooling/encryption/Decrypter.h @@ -24,7 +24,7 @@ #define __xmltooling_decrypter_h__ #include -#include +#include #include #include @@ -44,7 +44,7 @@ namespace xmlencryption { * @param KEKresolver resolves key decryption key * @param resolver resolves data decryption key */ - Decrypter(xmlsignature::KeyResolver* KEKresolver=NULL, xmlsignature::KeyResolver* resolver=NULL) + Decrypter(xmltooling::KeyResolver* KEKresolver=NULL, xmltooling::KeyResolver* resolver=NULL) : m_cipher(NULL), m_resolver(resolver), m_KEKresolver(KEKresolver) { } @@ -55,7 +55,7 @@ namespace xmlencryption { * * @param resolver the KeyResolver to attach */ - void setKeyResolver(xmlsignature::KeyResolver* resolver) { + void setKeyResolver(xmltooling::KeyResolver* resolver) { delete m_resolver; m_resolver=resolver; } @@ -65,7 +65,7 @@ namespace xmlencryption { * * @param resolver the KeyResolver to attach */ - void setKEKResolver(xmlsignature::KeyResolver* resolver) { + void setKEKResolver(xmltooling::KeyResolver* resolver) { delete m_KEKresolver; m_KEKresolver=resolver; } @@ -100,8 +100,8 @@ namespace xmlencryption { private: XENCCipher* m_cipher; - xmlsignature::KeyResolver* m_resolver; - xmlsignature::KeyResolver* m_KEKresolver; + xmltooling::KeyResolver* m_resolver; + xmltooling::KeyResolver* m_KEKresolver; }; DECL_XMLTOOLING_EXCEPTION(DecryptionException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmlencryption,xmltooling::XMLToolingException,Exceptions in decryption processing); diff --git a/xmltooling/encryption/EncryptedKeyResolver.h b/xmltooling/encryption/EncryptedKeyResolver.h index 1e22a42..95c436c 100644 --- a/xmltooling/encryption/EncryptedKeyResolver.h +++ b/xmltooling/encryption/EncryptedKeyResolver.h @@ -24,14 +24,14 @@ #define __xmltooling_enckeyres_h__ #include -#include +#include namespace xmlencryption { /** * An API for resolving encrypted decryption keys. */ - class XMLTOOL_API EncryptedKeyResolver : public xmlsignature::KeyResolver { + class XMLTOOL_API EncryptedKeyResolver : public xmltooling::KeyResolver { public: virtual ~EncryptedKeyResolver() {} diff --git a/xmltooling/security/AbstractPKIXTrustEngine.h b/xmltooling/security/AbstractPKIXTrustEngine.h index 7384f8c..f0a98c5 100644 --- a/xmltooling/security/AbstractPKIXTrustEngine.h +++ b/xmltooling/security/AbstractPKIXTrustEngine.h @@ -64,7 +64,7 @@ namespace xmltooling { bool checkEntityNames(X509* certEE, const KeyInfoSource& keyInfoSource) const; /** An inline KeyResolver for extracting certificates out of a signature. */ - xmlsignature::KeyResolver* m_inlineResolver; + KeyResolver* m_inlineResolver; public: virtual ~AbstractPKIXTrustEngine(); @@ -72,7 +72,7 @@ namespace xmltooling { virtual bool validate( xmlsignature::Signature& sig, const KeyInfoSource& keyInfoSource, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const; virtual bool validate( @@ -82,7 +82,7 @@ namespace xmltooling { const char* in, unsigned int in_len, const KeyInfoSource& keyInfoSource, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const; virtual bool validate( @@ -90,7 +90,7 @@ namespace xmltooling { const std::vector& certChain, const KeyInfoSource& keyInfoSource, bool checkName=true, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const; virtual bool validate( @@ -98,7 +98,7 @@ namespace xmltooling { STACK_OF(X509)* certChain, const KeyInfoSource& keyInfoSource, bool checkName=true, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const; /** @@ -111,14 +111,14 @@ namespace xmltooling { MAKE_NONCOPYABLE(PKIXValidationInfoIterator); protected: /** Reference to KeyResolver to use. */ - const xmlsignature::KeyResolver& m_keyResolver; + const KeyResolver& m_keyResolver; /** * Constructor * * @param keyResolver reference to KeyResolver to use */ - PKIXValidationInfoIterator(const xmlsignature::KeyResolver& keyResolver) : m_keyResolver(keyResolver) {} + PKIXValidationInfoIterator(const KeyResolver& keyResolver) : m_keyResolver(keyResolver) {} public: virtual ~PKIXValidationInfoIterator() {} @@ -171,7 +171,7 @@ namespace xmltooling { */ virtual PKIXValidationInfoIterator* getPKIXValidationInfoIterator( const KeyInfoSource& pkixSource, - const xmlsignature::KeyResolver& keyResolver + const KeyResolver& keyResolver ) const=0; }; }; diff --git a/xmltooling/signature/CachingKeyResolver.h b/xmltooling/security/CachingKeyResolver.h similarity index 84% rename from xmltooling/signature/CachingKeyResolver.h rename to xmltooling/security/CachingKeyResolver.h index 79498d3..fe30bc7 100644 --- a/xmltooling/signature/CachingKeyResolver.h +++ b/xmltooling/security/CachingKeyResolver.h @@ -15,7 +15,7 @@ */ /** - * @file xmltooling/signature/CachingKeyResolver.h + * @file xmltooling/security/CachingKeyResolver.h * * A KeyResolver that caches content across method calls. */ @@ -23,14 +23,14 @@ #if !defined(__xmltooling_cachekeyres_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_cachekeyres_h__ -#include +#include -namespace xmlsignature { +namespace xmltooling { /** * An API for resolving encrypted decryption keys. */ - class XMLTOOL_API CachingKeyResolver : public xmlsignature::KeyResolver { + class XMLTOOL_API CachingKeyResolver : public KeyResolver { public: virtual ~CachingKeyResolver() {} diff --git a/xmltooling/security/ChainingTrustEngine.h b/xmltooling/security/ChainingTrustEngine.h index d0ea5b7..d273c1e 100644 --- a/xmltooling/security/ChainingTrustEngine.h +++ b/xmltooling/security/ChainingTrustEngine.h @@ -80,7 +80,7 @@ namespace xmltooling { bool validate( xmlsignature::Signature& sig, const KeyInfoSource& keyInfoSource, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const; bool validate( const XMLCh* sigAlgorithm, @@ -89,21 +89,21 @@ namespace xmltooling { const char* in, unsigned int in_len, const KeyInfoSource& keyInfoSource, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const; bool validate( XSECCryptoX509* certEE, const std::vector& certChain, const KeyInfoSource& keyInfoSource, bool checkName=true, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const; bool validate( X509* certEE, STACK_OF(X509)* certChain, const KeyInfoSource& keyInfoSource, bool checkName=true, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const; private: std::vector m_engines; diff --git a/xmltooling/signature/CredentialResolver.h b/xmltooling/security/CredentialResolver.h similarity index 95% rename from xmltooling/signature/CredentialResolver.h rename to xmltooling/security/CredentialResolver.h index 6b133fc..0317299 100644 --- a/xmltooling/signature/CredentialResolver.h +++ b/xmltooling/security/CredentialResolver.h @@ -29,12 +29,12 @@ #include #include -namespace xmlsignature { +namespace xmltooling { /** * An API for resolving local/owned keys and certificates */ - class XMLTOOL_API CredentialResolver : public xmltooling::Lockable + class XMLTOOL_API CredentialResolver : public Lockable { MAKE_NONCOPYABLE(CredentialResolver); protected: diff --git a/xmltooling/signature/KeyResolver.h b/xmltooling/security/KeyResolver.h similarity index 92% rename from xmltooling/signature/KeyResolver.h rename to xmltooling/security/KeyResolver.h index 7412133..6d7762c 100644 --- a/xmltooling/signature/KeyResolver.h +++ b/xmltooling/security/KeyResolver.h @@ -15,7 +15,7 @@ */ /** - * @file KeyResolver.h + * @file xmltooling/security/KeyResolver.h * * Resolves public keys and certificates based on KeyInfo information or * external factors. @@ -36,6 +36,9 @@ namespace xmlsignature { class XMLTOOL_API KeyInfo; class XMLTOOL_API Signature; +}; + +namespace xmltooling { /** * An API for resolving keys. The default/simple implementation @@ -65,7 +68,7 @@ namespace xmlsignature { * @param keyInfo the key information * @return the resolved key */ - virtual XSECCryptoKey* resolveKey(const KeyInfo* keyInfo) const { + virtual XSECCryptoKey* resolveKey(const xmlsignature::KeyInfo* keyInfo) const { return m_key ? m_key->clone() : NULL; } @@ -87,7 +90,7 @@ namespace xmlsignature { * @param sig signature containing the key information * @return the resolved key */ - XSECCryptoKey* resolveKey(const Signature* sig) const; + XSECCryptoKey* resolveKey(const xmlsignature::Signature* sig) const; /** * A wrapper that handles disposal of certificates when required. @@ -151,7 +154,7 @@ namespace xmlsignature { * @return number of certificates returned */ virtual std::vector::size_type resolveCertificates( - const KeyInfo* keyInfo, ResolvedCertificates& certs + const xmlsignature::KeyInfo* keyInfo, ResolvedCertificates& certs ) const; /** @@ -175,7 +178,7 @@ namespace xmlsignature { * @return number of certificates returned */ std::vector::size_type resolveCertificates( - const Signature* sig, ResolvedCertificates& certs + const xmlsignature::Signature* sig, ResolvedCertificates& certs ) const; /** @@ -185,7 +188,7 @@ namespace xmlsignature { * @param keyInfo the key information * @return the resolved CRL */ - virtual xmltooling::XSECCryptoX509CRL* resolveCRL(const KeyInfo* keyInfo) const; + virtual XSECCryptoX509CRL* resolveCRL(const xmlsignature::KeyInfo* keyInfo) const; /** * Returns a CRL based on the supplied KeyInfo information. @@ -194,7 +197,7 @@ namespace xmlsignature { * @param keyInfo the key information * @return the resolved CRL */ - virtual xmltooling::XSECCryptoX509CRL* resolveCRL(DSIGKeyInfoList* keyInfo) const; + virtual XSECCryptoX509CRL* resolveCRL(DSIGKeyInfoList* keyInfo) const; /** * Returns a CRL based on the supplied KeyInfo information. @@ -203,7 +206,7 @@ namespace xmlsignature { * @param sig signature containing the key information * @return the resolved CRL */ - xmltooling::XSECCryptoX509CRL* resolveCRL(const Signature* sig) const; + XSECCryptoX509CRL* resolveCRL(const xmlsignature::Signature* sig) const; protected: /** Stores an explicit key. */ diff --git a/xmltooling/signature/OpenSSLCredentialResolver.h b/xmltooling/security/OpenSSLCredentialResolver.h similarity index 91% rename from xmltooling/signature/OpenSSLCredentialResolver.h rename to xmltooling/security/OpenSSLCredentialResolver.h index e974bac..7e9ace5 100644 --- a/xmltooling/signature/OpenSSLCredentialResolver.h +++ b/xmltooling/security/OpenSSLCredentialResolver.h @@ -15,7 +15,7 @@ */ /** - * @file xmltooling/signature/OpenSSLCredentialResolver.h + * @file xmltooling/security/OpenSSLCredentialResolver.h * * OpenSSL-specific credential resolver */ @@ -23,11 +23,11 @@ #if !defined(__xmltooling_opensslcredres_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_opensslcredres_h__ -#include +#include #include -namespace xmlsignature { +namespace xmltooling { /** * An OpenSSL-specific API for resolving local/owned keys and certificates diff --git a/xmltooling/security/OpenSSLTrustEngine.h b/xmltooling/security/OpenSSLTrustEngine.h index b87d633..b343449 100644 --- a/xmltooling/security/OpenSSLTrustEngine.h +++ b/xmltooling/security/OpenSSLTrustEngine.h @@ -75,7 +75,7 @@ namespace xmltooling { STACK_OF(X509)* certChain, const KeyInfoSource& keyInfoSource, bool checkName=true, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const=0; }; diff --git a/xmltooling/security/TrustEngine.h b/xmltooling/security/TrustEngine.h index e582fd0..35382b5 100644 --- a/xmltooling/security/TrustEngine.h +++ b/xmltooling/security/TrustEngine.h @@ -25,7 +25,7 @@ #define __xmltooling_trust_h__ #include -#include +#include #include namespace xmltooling { @@ -53,7 +53,7 @@ namespace xmltooling { TrustEngine(const DOMElement* e=NULL); /** Default KeyResolver instance. */ - xmlsignature::KeyResolver* m_keyResolver; + KeyResolver* m_keyResolver; public: virtual ~TrustEngine(); @@ -76,7 +76,7 @@ namespace xmltooling { virtual bool validate( xmlsignature::Signature& sig, const KeyInfoSource& keyInfoSource, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const=0; /** @@ -109,7 +109,7 @@ namespace xmltooling { const char* in, unsigned int in_len, const KeyInfoSource& keyInfoSource, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const=0; }; diff --git a/xmltooling/security/X509TrustEngine.h b/xmltooling/security/X509TrustEngine.h index 9b7ac6e..6387baf 100644 --- a/xmltooling/security/X509TrustEngine.h +++ b/xmltooling/security/X509TrustEngine.h @@ -71,7 +71,7 @@ namespace xmltooling { const std::vector& certChain, const KeyInfoSource& keyInfoSource, bool checkName=true, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL ) const=0; }; diff --git a/xmltooling/security/impl/ChainingTrustEngine.cpp b/xmltooling/security/impl/ChainingTrustEngine.cpp index dc66969..41e04b1 100644 --- a/xmltooling/security/impl/ChainingTrustEngine.cpp +++ b/xmltooling/security/impl/ChainingTrustEngine.cpp @@ -117,7 +117,7 @@ bool ChainingTrustEngine::validate( STACK_OF(X509)* certChain, const KeyInfoSource& keyInfoSource, bool checkName, - const xmlsignature::KeyResolver* keyResolver + const KeyResolver* keyResolver ) const { OpenSSLTrustEngine* down; diff --git a/xmltooling/signature/impl/CredentialResolver.cpp b/xmltooling/security/impl/CredentialResolver.cpp similarity index 76% rename from xmltooling/signature/impl/CredentialResolver.cpp rename to xmltooling/security/impl/CredentialResolver.cpp index d1e4a85..5cafddd 100644 --- a/xmltooling/signature/impl/CredentialResolver.cpp +++ b/xmltooling/security/impl/CredentialResolver.cpp @@ -21,18 +21,16 @@ */ #include "internal.h" -#include "signature/CredentialResolver.h" +#include "security/CredentialResolver.h" -using namespace xmlsignature; using namespace xmltooling; -namespace xmlsignature { +namespace xmltooling { XMLTOOL_DLLLOCAL PluginManager::Factory FilesystemCredentialResolverFactory; }; -void XMLTOOL_API xmlsignature::registerCredentialResolvers() +void XMLTOOL_API xmltooling::registerCredentialResolvers() { XMLToolingConfig& conf=XMLToolingConfig::getConfig(); conf.CredentialResolverManager.registerFactory(FILESYSTEM_CREDENTIAL_RESOLVER, FilesystemCredentialResolverFactory); - conf.CredentialResolverManager.registerFactory("edu.internet2.middleware.shibboleth.common.Credentials.FileCredentialResolver", FilesystemCredentialResolverFactory); } diff --git a/xmltooling/signature/impl/FilesystemCredentialResolver.cpp b/xmltooling/security/impl/FilesystemCredentialResolver.cpp similarity index 98% rename from xmltooling/signature/impl/FilesystemCredentialResolver.cpp rename to xmltooling/security/impl/FilesystemCredentialResolver.cpp index de976e0..5d898b2 100644 --- a/xmltooling/signature/impl/FilesystemCredentialResolver.cpp +++ b/xmltooling/security/impl/FilesystemCredentialResolver.cpp @@ -21,8 +21,8 @@ */ #include "internal.h" -#include "signature/KeyResolver.h" -#include "signature/OpenSSLCredentialResolver.h" +#include "security/KeyResolver.h" +#include "security/OpenSSLCredentialResolver.h" #include "util/NDC.h" #include "util/XMLHelper.h" @@ -55,8 +55,8 @@ static int passwd_callback(char* buf, int len, int verify, void* passwd) return 0; } -namespace xmlsignature { - class FilesystemCredentialResolver : public OpenSSLCredentialResolver, public KeyResolver +namespace xmltooling { + class XMLTOOL_DLLLOCAL FilesystemCredentialResolver : public OpenSSLCredentialResolver, public KeyResolver { public: FilesystemCredentialResolver(const DOMElement* e); diff --git a/xmltooling/signature/impl/InlineKeyResolver.cpp b/xmltooling/security/impl/InlineKeyResolver.cpp similarity index 99% rename from xmltooling/signature/impl/InlineKeyResolver.cpp rename to xmltooling/security/impl/InlineKeyResolver.cpp index df99b94..311fd06 100644 --- a/xmltooling/signature/impl/InlineKeyResolver.cpp +++ b/xmltooling/security/impl/InlineKeyResolver.cpp @@ -21,7 +21,7 @@ */ #include "internal.h" -#include "signature/CachingKeyResolver.h" +#include "security/CachingKeyResolver.h" #include "signature/KeyInfo.h" #include "util/NDC.h" #include "util/Threads.h" @@ -43,7 +43,7 @@ using namespace xmltooling; using namespace log4cpp; using namespace std; -namespace xmlsignature { +namespace xmltooling { class XMLTOOL_DLLLOCAL InlineKeyResolver : public CachingKeyResolver { public: diff --git a/xmltooling/signature/impl/KeyResolver.cpp b/xmltooling/security/impl/KeyResolver.cpp similarity index 96% rename from xmltooling/signature/impl/KeyResolver.cpp rename to xmltooling/security/impl/KeyResolver.cpp index 6734672..c319b78 100644 --- a/xmltooling/signature/impl/KeyResolver.cpp +++ b/xmltooling/security/impl/KeyResolver.cpp @@ -21,19 +21,19 @@ */ #include "internal.h" -#include "signature/KeyResolver.h" +#include "security/KeyResolver.h" #include "signature/Signature.h" using namespace xmlsignature; using namespace xmltooling; using namespace std; -namespace xmlsignature { +namespace xmltooling { XMLTOOL_DLLLOCAL PluginManager::Factory FilesystemKeyResolverFactory; XMLTOOL_DLLLOCAL PluginManager::Factory InlineKeyResolverFactory; }; -void XMLTOOL_API xmlsignature::registerKeyResolvers() +void XMLTOOL_API xmltooling::registerKeyResolvers() { XMLToolingConfig& conf=XMLToolingConfig::getConfig(); conf.KeyResolverManager.registerFactory(FILESYSTEM_KEY_RESOLVER, FilesystemKeyResolverFactory); diff --git a/xmltooling/signature/SignatureValidator.h b/xmltooling/signature/SignatureValidator.h index 8156bc8..0e6ec5a 100644 --- a/xmltooling/signature/SignatureValidator.h +++ b/xmltooling/signature/SignatureValidator.h @@ -23,7 +23,7 @@ #if !defined(__xmltooling_sigval_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_sigval_h__ -#include +#include #include #include @@ -40,7 +40,7 @@ namespace xmlsignature { * * @param resolver the key resolver to use, will be freed by Validator */ - SignatureValidator(KeyResolver* resolver) : m_key(NULL), m_resolver(resolver) { + SignatureValidator(xmltooling::KeyResolver* resolver) : m_key(NULL), m_resolver(resolver) { } /** @@ -82,7 +82,7 @@ namespace xmlsignature { * * @param resolver the KeyResolver to attach */ - void setKeyResolver(KeyResolver* resolver) { + void setKeyResolver(xmltooling::KeyResolver* resolver) { delete m_key; delete m_resolver; m_key=NULL; @@ -94,7 +94,7 @@ namespace xmlsignature { XSECCryptoKey* m_key; /** KeyResolver to use against signature. */ - KeyResolver* m_resolver; + xmltooling::KeyResolver* m_resolver; }; }; diff --git a/xmltooling/soap/SOAPTransport.h b/xmltooling/soap/SOAPTransport.h index cdebd4b..469b18b 100644 --- a/xmltooling/soap/SOAPTransport.h +++ b/xmltooling/soap/SOAPTransport.h @@ -103,7 +103,7 @@ namespace xmltooling { * @param credResolver a locked CredentialResolver instance, or NULL * @return true iff the transport supports the use of a CredentialResolver */ - virtual bool setCredentialResolver(const xmlsignature::CredentialResolver* credResolver)=0; + virtual bool setCredentialResolver(const CredentialResolver* credResolver)=0; /** * Provides a TrustEngine to the transport to authenticate the transport peer. @@ -118,7 +118,7 @@ namespace xmltooling { virtual bool setTrustEngine( const X509TrustEngine* trustEngine, bool mandatory=true, - const xmlsignature::KeyResolver* keyResolver=NULL + const KeyResolver* keyResolver=NULL )=0; #endif diff --git a/xmltooling/soap/impl/CURLSOAPTransport.cpp b/xmltooling/soap/impl/CURLSOAPTransport.cpp index 34359b4..314940b 100644 --- a/xmltooling/soap/impl/CURLSOAPTransport.cpp +++ b/xmltooling/soap/impl/CURLSOAPTransport.cpp @@ -23,7 +23,7 @@ #include "internal.h" #include "exceptions.h" #include "security/OpenSSLTrustEngine.h" -#include "signature/OpenSSLCredentialResolver.h" +#include "security/OpenSSLCredentialResolver.h" #include "soap/HTTPSOAPTransport.h" #include "soap/OpenSSLSOAPTransport.h" #include "util/NDC.h" @@ -34,7 +34,6 @@ #include #include -using namespace xmlsignature; using namespace xmltooling; using namespace log4cpp; using namespace std; diff --git a/xmltooling/xmltooling.vcproj b/xmltooling/xmltooling.vcproj index 2b3a530..e09b176 100644 --- a/xmltooling/xmltooling.vcproj +++ b/xmltooling/xmltooling.vcproj @@ -314,18 +314,6 @@ Name="impl" > - - - - - - @@ -334,10 +322,6 @@ > - - @@ -386,10 +370,26 @@ > + + + + + + + + @@ -613,30 +613,14 @@ Name="signature" > - - - - - - - - @@ -673,14 +657,30 @@ > + + + + + + + + diff --git a/xmltoolingtest/EncryptionTest.h b/xmltoolingtest/EncryptionTest.h index 8085fbe..77fc7af 100644 --- a/xmltoolingtest/EncryptionTest.h +++ b/xmltoolingtest/EncryptionTest.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/xmltoolingtest/FilesystemCredentialResolverTest.h b/xmltoolingtest/FilesystemCredentialResolverTest.h index a1ba6f3..8091870 100644 --- a/xmltoolingtest/FilesystemCredentialResolverTest.h +++ b/xmltoolingtest/FilesystemCredentialResolverTest.h @@ -16,7 +16,7 @@ #include "XMLObjectBaseTestCase.h" -#include +#include #include diff --git a/xmltoolingtest/InlineKeyResolverTest.h b/xmltoolingtest/InlineKeyResolverTest.h index 464bcdb..d59b0b3 100644 --- a/xmltoolingtest/InlineKeyResolverTest.h +++ b/xmltoolingtest/InlineKeyResolverTest.h @@ -18,7 +18,7 @@ #include #include -#include +#include using namespace xmlsignature; diff --git a/xmltoolingtest/SignatureTest.h b/xmltoolingtest/SignatureTest.h index 3682c40..394583e 100644 --- a/xmltoolingtest/SignatureTest.h +++ b/xmltoolingtest/SignatureTest.h @@ -16,7 +16,7 @@ #include "XMLObjectBaseTestCase.h" -#include +#include #include #include diff --git a/xmltoolingtest/data/catalog.xml b/xmltoolingtest/data/catalog.xml index 6094e8d..8c3226a 100644 --- a/xmltoolingtest/data/catalog.xml +++ b/xmltoolingtest/data/catalog.xml @@ -1,7 +1,6 @@ - - - - + + +