Reducing header overuse, non-inlining selected methods (CPPOST-35).
[shibboleth/xmltooling.git] / xmltooling / signature / impl / SignatureValidator.cpp
index 667a439..4c7df2b 100644 (file)
@@ -21,6 +21,8 @@
  */
  
 #include "internal.h"
+#include "security/Credential.h"
+#include "signature/Signature.h"
 #include "signature/SignatureValidator.h"
 
 #include <xsec/enc/XSECCryptoException.hpp>
@@ -30,6 +32,26 @@ using namespace xmlsignature;
 using namespace xmltooling;
 using namespace std;
 
+SignatureValidator::SignatureValidator(XSECCryptoKey* key) : m_key(key), m_credential(NULL)
+{
+}
+
+SignatureValidator::SignatureValidator(const Credential* credential) : m_key(NULL), m_credential(credential)
+{
+}
+
+void SignatureValidator::setKey(XSECCryptoKey* key)
+{
+    m_key = key;
+    m_credential = NULL;
+}
+
+void SignatureValidator::setCredential(const Credential* credential)
+{
+    m_key = NULL;
+    m_credential = credential;
+}
+
 void SignatureValidator::validate(const XMLObject* xmlObject) const
 {
     const Signature* sigObj=dynamic_cast<const Signature*>(xmlObject);