Moved key/cred resolution classes out of xmlsig namespace.
authorScott Cantor <cantor.2@osu.edu>
Fri, 2 Mar 2007 02:37:08 +0000 (02:37 +0000)
committerScott Cantor <cantor.2@osu.edu>
Fri, 2 Mar 2007 02:37:08 +0000 (02:37 +0000)
29 files changed:
configure.ac
xmltooling/Makefile.am
xmltooling/XMLToolingConfig.cpp
xmltooling/XMLToolingConfig.h
xmltooling/encryption/Decrypter.h
xmltooling/encryption/EncryptedKeyResolver.h
xmltooling/security/AbstractPKIXTrustEngine.h
xmltooling/security/CachingKeyResolver.h [moved from xmltooling/signature/CachingKeyResolver.h with 84% similarity]
xmltooling/security/ChainingTrustEngine.h
xmltooling/security/CredentialResolver.h [moved from xmltooling/signature/CredentialResolver.h with 95% similarity]
xmltooling/security/KeyResolver.h [moved from xmltooling/signature/KeyResolver.h with 92% similarity]
xmltooling/security/OpenSSLCredentialResolver.h [moved from xmltooling/signature/OpenSSLCredentialResolver.h with 91% similarity]
xmltooling/security/OpenSSLTrustEngine.h
xmltooling/security/TrustEngine.h
xmltooling/security/X509TrustEngine.h
xmltooling/security/impl/ChainingTrustEngine.cpp
xmltooling/security/impl/CredentialResolver.cpp [moved from xmltooling/signature/impl/CredentialResolver.cpp with 76% similarity]
xmltooling/security/impl/FilesystemCredentialResolver.cpp [moved from xmltooling/signature/impl/FilesystemCredentialResolver.cpp with 98% similarity]
xmltooling/security/impl/InlineKeyResolver.cpp [moved from xmltooling/signature/impl/InlineKeyResolver.cpp with 99% similarity]
xmltooling/security/impl/KeyResolver.cpp [moved from xmltooling/signature/impl/KeyResolver.cpp with 96% similarity]
xmltooling/signature/SignatureValidator.h
xmltooling/soap/SOAPTransport.h
xmltooling/soap/impl/CURLSOAPTransport.cpp
xmltooling/xmltooling.vcproj
xmltoolingtest/EncryptionTest.h
xmltoolingtest/FilesystemCredentialResolverTest.h
xmltoolingtest/InlineKeyResolverTest.h
xmltoolingtest/SignatureTest.h
xmltoolingtest/data/catalog.xml

index b81dbb5..568a529 100644 (file)
@@ -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/util/PlatformUtils.hpp>],
         [xercesc::XMLPlatformUtils::Initialize()],
index b4a5c80..d1d8467 100644 (file)
@@ -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
index 305bd39..4a686fe 100644 (file)
@@ -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"
index 44eba99..7a333d6 100644 (file)
 #include <xmltooling/util/ParserPool.h>
 
 #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<xmlsignature::KeyResolver,const DOMElement*> KeyResolverManager;
+        PluginManager<KeyResolver,const DOMElement*> KeyResolverManager;
 
         /**
          * Manages factories for CredentialResolver plugins.
          */
-        PluginManager<xmlsignature::CredentialResolver,const DOMElement*> CredentialResolverManager;
+        PluginManager<CredentialResolver,const DOMElement*> CredentialResolverManager;
 
         /**
          * Manages factories for TrustEngine plugins.
index 49b3875..5abac55 100644 (file)
@@ -24,7 +24,7 @@
 #define __xmltooling_decrypter_h__
 
 #include <xmltooling/encryption/Encryption.h>
-#include <xmltooling/signature/KeyResolver.h>
+#include <xmltooling/security/KeyResolver.h>
 
 #include <xsec/enc/XSECCryptoKey.hpp>
 #include <xsec/xenc/XENCCipher.hpp>
@@ -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);
index 1e22a42..95c436c 100644 (file)
 #define __xmltooling_enckeyres_h__
 
 #include <xmltooling/encryption/Encryption.h>
-#include <xmltooling/signature/KeyResolver.h>
+#include <xmltooling/security/KeyResolver.h>
 
 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() {}
         
index 7384f8c..f0a98c5 100644 (file)
@@ -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<XSECCryptoX509*>& 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;
     };
 };
similarity index 84%
rename from xmltooling/signature/CachingKeyResolver.h
rename to xmltooling/security/CachingKeyResolver.h
index 79498d3..fe30bc7 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 /**
- * @file xmltooling/signature/CachingKeyResolver.h
+ * @file xmltooling/security/CachingKeyResolver.h
  * 
  * A KeyResolver that caches content across method calls.
  */
 #if !defined(__xmltooling_cachekeyres_h__) && !defined(XMLTOOLING_NO_XMLSEC)
 #define __xmltooling_cachekeyres_h__
 
-#include <xmltooling/signature/KeyResolver.h>
+#include <xmltooling/security/KeyResolver.h>
 
-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() {}
         
index d0ea5b7..d273c1e 100644 (file)
@@ -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<XSECCryptoX509*>& 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<TrustEngine*> m_engines;
similarity index 95%
rename from xmltooling/signature/CredentialResolver.h
rename to xmltooling/security/CredentialResolver.h
index 6b133fc..0317299 100644 (file)
 #include <xsec/enc/XSECCryptoKey.hpp>
 #include <xsec/enc/XSECCryptoX509.hpp>
 
-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:
similarity index 92%
rename from xmltooling/signature/KeyResolver.h
rename to xmltooling/security/KeyResolver.h
index 7412133..6d7762c 100644 (file)
@@ -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<XSECCryptoX509*>::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<XSECCryptoX509*>::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. */
@@ -15,7 +15,7 @@
  */
 
 /**
- * @file xmltooling/signature/OpenSSLCredentialResolver.h
+ * @file xmltooling/security/OpenSSLCredentialResolver.h
  * 
  * OpenSSL-specific credential resolver
  */
 #if !defined(__xmltooling_opensslcredres_h__) && !defined(XMLTOOLING_NO_XMLSEC)
 #define __xmltooling_opensslcredres_h__
 
-#include <xmltooling/signature/CredentialResolver.h>
+#include <xmltooling/security/CredentialResolver.h>
 
 #include <openssl/ssl.h>
 
-namespace xmlsignature {
+namespace xmltooling {
 
     /**
      * An OpenSSL-specific API for resolving local/owned keys and certificates
index b87d633..b343449 100644 (file)
@@ -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;
     };
     
index e582fd0..35382b5 100644 (file)
@@ -25,7 +25,7 @@
 #define __xmltooling_trust_h__
 
 #include <xmltooling/security/KeyInfoSource.h>
-#include <xmltooling/signature/KeyResolver.h>
+#include <xmltooling/security/KeyResolver.h>
 #include <xmltooling/signature/Signature.h>
 
 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;
     };
 
index 9b7ac6e..6387baf 100644 (file)
@@ -71,7 +71,7 @@ namespace xmltooling {
             const std::vector<XSECCryptoX509*>& certChain,
             const KeyInfoSource& keyInfoSource,
             bool checkName=true,
-            const xmlsignature::KeyResolver* keyResolver=NULL
+            const KeyResolver* keyResolver=NULL
             ) const=0;
     };
     
index dc66969..41e04b1 100644 (file)
@@ -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;
  */
 
 #include "internal.h"
-#include "signature/CredentialResolver.h"
+#include "security/CredentialResolver.h"
 
-using namespace xmlsignature;
 using namespace xmltooling;
 
-namespace xmlsignature {
+namespace xmltooling {
     XMLTOOL_DLLLOCAL PluginManager<CredentialResolver,const DOMElement*>::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);
 }
@@ -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);
@@ -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:
similarity index 96%
rename from xmltooling/signature/impl/KeyResolver.cpp
rename to xmltooling/security/impl/KeyResolver.cpp
index 6734672..c319b78 100644 (file)
  */
 
 #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<KeyResolver,const DOMElement*>::Factory FilesystemKeyResolverFactory;
     XMLTOOL_DLLLOCAL PluginManager<KeyResolver,const DOMElement*>::Factory InlineKeyResolverFactory;
 };
 
-void XMLTOOL_API xmlsignature::registerKeyResolvers()
+void XMLTOOL_API xmltooling::registerKeyResolvers()
 {
     XMLToolingConfig& conf=XMLToolingConfig::getConfig();
     conf.KeyResolverManager.registerFactory(FILESYSTEM_KEY_RESOLVER, FilesystemKeyResolverFactory);
index 8156bc8..0e6ec5a 100644 (file)
@@ -23,7 +23,7 @@
 #if !defined(__xmltooling_sigval_h__) && !defined(XMLTOOLING_NO_XMLSEC)
 #define __xmltooling_sigval_h__
 
-#include <xmltooling/signature/KeyResolver.h>
+#include <xmltooling/security/KeyResolver.h>
 #include <xmltooling/signature/Signature.h>
 #include <xmltooling/validation/Validator.h>
 
@@ -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;
     };
 
 };
index cdebd4b..469b18b 100644 (file)
@@ -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
 
index 34359b4..314940b 100644 (file)
@@ -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 <log4cpp/Category.hh>
 #include <openssl/x509_vfy.h>
 
-using namespace xmlsignature;
 using namespace xmltooling;
 using namespace log4cpp;
 using namespace std;
index 2b3a530..e09b176 100644 (file)
                                        Name="impl"\r
                                        >\r
                                        <File\r
-                                               RelativePath=".\signature\impl\CredentialResolver.cpp"\r
-                                               >\r
-                                       </File>\r
-                                       <File\r
-                                               RelativePath=".\signature\impl\FilesystemCredentialResolver.cpp"\r
-                                               >\r
-                                       </File>\r
-                                       <File\r
-                                               RelativePath=".\signature\impl\InlineKeyResolver.cpp"\r
-                                               >\r
-                                       </File>\r
-                                       <File\r
                                                RelativePath=".\signature\impl\KeyInfoImpl.cpp"\r
                                                >\r
                                        </File>\r
                                                >\r
                                        </File>\r
                                        <File\r
-                                               RelativePath=".\signature\impl\KeyResolver.cpp"\r
-                                               >\r
-                                       </File>\r
-                                       <File\r
                                                RelativePath=".\signature\impl\SignatureValidator.cpp"\r
                                                >\r
                                        </File>\r
                                                >\r
                                        </File>\r
                                        <File\r
+                                               RelativePath=".\security\impl\CredentialResolver.cpp"\r
+                                               >\r
+                                       </File>\r
+                                       <File\r
                                                RelativePath=".\security\impl\ExplicitKeyTrustEngine.cpp"\r
                                                >\r
                                        </File>\r
                                        <File\r
+                                               RelativePath=".\security\impl\FilesystemCredentialResolver.cpp"\r
+                                               >\r
+                                       </File>\r
+                                       <File\r
+                                               RelativePath=".\security\impl\InlineKeyResolver.cpp"\r
+                                               >\r
+                                       </File>\r
+                                       <File\r
+                                               RelativePath=".\security\impl\KeyResolver.cpp"\r
+                                               >\r
+                                       </File>\r
+                                       <File\r
                                                RelativePath=".\security\impl\OpenSSLCryptoX509CRL.cpp"\r
                                                >\r
                                        </File>\r
                                Name="signature"\r
                                >\r
                                <File\r
-                                       RelativePath=".\signature\CachingKeyResolver.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
                                        RelativePath=".\signature\ContentReference.h"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath=".\signature\CredentialResolver.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
                                        RelativePath=".\signature\KeyInfo.h"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath=".\signature\KeyResolver.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath=".\signature\OpenSSLCredentialResolver.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
                                        RelativePath=".\signature\Signature.h"\r
                                        >\r
                                </File>\r
                                        >\r
                                </File>\r
                                <File\r
+                                       RelativePath=".\security\CachingKeyResolver.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
                                        RelativePath=".\security\ChainingTrustEngine.h"\r
                                        >\r
                                </File>\r
                                <File\r
+                                       RelativePath=".\security\CredentialResolver.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
                                        RelativePath=".\security\KeyInfoSource.h"\r
                                        >\r
                                </File>\r
                                <File\r
+                                       RelativePath=".\security\KeyResolver.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath=".\security\OpenSSLCredentialResolver.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
                                        RelativePath=".\security\OpenSSLCryptoX509CRL.h"\r
                                        >\r
                                </File>\r
index 8085fbe..77fc7af 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <xmltooling/encryption/Decrypter.h>
 #include <xmltooling/encryption/Encrypter.h>
-#include <xmltooling/signature/CredentialResolver.h>
+#include <xmltooling/security/CredentialResolver.h>
 
 #include <fstream>
 #include <xercesc/util/XMLUniDefs.hpp>
index a1ba6f3..8091870 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "XMLObjectBaseTestCase.h"
 
-#include <xmltooling/signature/CredentialResolver.h>
+#include <xmltooling/security/CredentialResolver.h>
 
 #include <fstream>
 
index 464bcdb..d59b0b3 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <fstream>
 #include <xmltooling/signature/KeyInfo.h>
-#include <xmltooling/signature/KeyResolver.h>
+#include <xmltooling/security/KeyResolver.h>
 
 using namespace xmlsignature;
 
index 3682c40..394583e 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "XMLObjectBaseTestCase.h"
 
-#include <xmltooling/signature/CredentialResolver.h>
+#include <xmltooling/security/CredentialResolver.h>
 #include <xmltooling/signature/KeyInfo.h>
 #include <xmltooling/signature/SignatureValidator.h>
 
index 6094e8d..8c3226a 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
 <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
-    <uri name="http://www.w3.org/XML/1998/namespace" uri="../schemas/xml.xsd"/>
-    <uri name="http://www.w3.org/2001/04/xmlenc#" uri="../schemas/xenc-schema.xsd"/>
-    <uri name="http://www.w3.org/2000/09/xmldsig#" uri="../schemas/xmldsig-core-schema.xsd"/>
+    <system systemId="http://www.w3.org/XML/1998/namespace" uri="../schemas/xml.xsd"/>
+    <system systemId="http://www.w3.org/2001/04/xmlenc#" uri="../schemas/xenc-schema.xsd"/>
+    <system systemId="http://www.w3.org/2000/09/xmldsig#" uri="../schemas/xmldsig-core-schema.xsd"/>
 </catalog>