Add logging.
[shibboleth/xmltooling.git] / xmltooling / security / ChainingTrustEngine.h
index d0ea5b7..bd97ac9 100644 (file)
 #define __xmltooling_chaintrust_h__
 
 #include <xmltooling/security/OpenSSLTrustEngine.h>
+#include <xmltooling/security/SignatureTrustEngine.h>
 
 namespace xmltooling {
 
     /**
      * OpenSSLTrustEngine that uses multiple engines in sequence.
      */
-    class XMLTOOL_API ChainingTrustEngine : public OpenSSLTrustEngine {
+    class XMLTOOL_API ChainingTrustEngine : public SignatureTrustEngine, public OpenSSLTrustEngine {
     public:
         /**
          * Constructor.
@@ -45,7 +46,7 @@ namespace xmltooling {
          * 
          * @param e DOM to supply configuration for provider
          */
-        ChainingTrustEngine(const DOMElement* e=NULL);
+        ChainingTrustEngine(const xercesc::DOMElement* e=NULL);
         
         /**
          * Destructor will delete any embedded engines.
@@ -79,8 +80,8 @@ namespace xmltooling {
 
         bool validate(
             xmlsignature::Signature& sig,
-            const KeyInfoSource& keyInfoSource,
-            const xmlsignature::KeyResolver* keyResolver=NULL
+            const CredentialResolver& credResolver,
+            CredentialCriteria* criteria=NULL
             ) const;
         bool validate(
             const XMLCh* sigAlgorithm,
@@ -88,25 +89,26 @@ namespace xmltooling {
             xmlsignature::KeyInfo* keyInfo,
             const char* in,
             unsigned int in_len,
-            const KeyInfoSource& keyInfoSource,
-            const xmlsignature::KeyResolver* keyResolver=NULL
+            const CredentialResolver& credResolver,
+            CredentialCriteria* criteria=NULL
             ) const;
         bool validate(
             XSECCryptoX509* certEE,
             const std::vector<XSECCryptoX509*>& certChain,
-            const KeyInfoSource& keyInfoSource,
-            bool checkName=true,
-            const xmlsignature::KeyResolver* keyResolver=NULL
+            const CredentialResolver& credResolver,
+            CredentialCriteria* criteria=NULL
             ) const;
         bool validate(
             X509* certEE,
             STACK_OF(X509)* certChain,
-            const KeyInfoSource& keyInfoSource,
-            bool checkName=true,
-            const xmlsignature::KeyResolver* keyResolver=NULL
+            const CredentialResolver& credResolver,
+            CredentialCriteria* criteria=NULL
             ) const;
     private:
         std::vector<TrustEngine*> m_engines;
+        std::vector<SignatureTrustEngine*> m_sigEngines;
+        std::vector<X509TrustEngine*> m_x509Engines;
+        std::vector<OpenSSLTrustEngine*> m_osslEngines;
     };
     
 };