X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Fsignature%2FSignatureValidator.h;h=e948e406fa8b36ff8a9c567143fac3dd6ac3c1e2;hb=30654333446e3148ff35914b2fe087da0719889b;hp=61fc5cab4260b61a2c111e2302171675d52a29a6;hpb=a79eaef63f0772d90acbeedb5966653b50f3bd2f;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltooling/signature/SignatureValidator.h b/xmltooling/signature/SignatureValidator.h index 61fc5ca..e948e40 100644 --- a/xmltooling/signature/SignatureValidator.h +++ b/xmltooling/signature/SignatureValidator.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,18 @@ #if !defined(__xmltooling_sigval_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_sigval_h__ -#include -#include #include +class XSECCryptoKey; + +namespace xmltooling { + class XMLTOOL_API Credential; +}; + namespace xmlsignature { + class XMLTOOL_API Signature; + /** * Validator for signatures based on a Credential */ @@ -40,18 +46,18 @@ namespace xmlsignature { * * @param key the key to use */ - SignatureValidator(XSECCryptoKey* key=NULL) : m_key(key), m_credential(NULL) {} + SignatureValidator(XSECCryptoKey* key=NULL); /** * Constructor using a Credential * * @param credential the credential to use */ - SignatureValidator(const xmltooling::Credential* credential) : m_key(NULL), m_credential(credential) {} + SignatureValidator(const xmltooling::Credential* credential); virtual ~SignatureValidator() {} - virtual void validate(const xmltooling::XMLObject* xmlObject) const; + void validate(const xmltooling::XMLObject* xmlObject) const; /** * Type-safe validator. @@ -65,20 +71,14 @@ namespace xmlsignature { * * @param key the key to attach */ - void setKey(XSECCryptoKey* key) { - m_key = key; - m_credential = NULL; - } + void setKey(XSECCryptoKey* key); /** * Replace the current Credential, if any, with a new one. * * @param credential the Credential to attach */ - void setCredential(const xmltooling::Credential* credential) { - m_key = NULL; - m_credential = credential; - } + void setCredential(const xmltooling::Credential* credential); protected: /** Verification key. */