From 85276839f6200c5df3d8faeeef1f17f82ea57cd5 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Fri, 11 May 2007 05:20:38 +0000 Subject: [PATCH 1/1] Fix method signature mismatch, redeclare pure methods on pure subclasses. --- xmltooling/encryption/impl/EncryptionImpl.cpp | 4 ++-- xmltooling/security/OpenSSLTrustEngine.h | 25 ++++++++++++++++++++++++- xmltooling/security/X509TrustEngine.h | 18 +++++++++++++++++- xmltooling/soap/impl/SOAPImpl.cpp | 8 ++++---- 4 files changed, 47 insertions(+), 8 deletions(-) diff --git a/xmltooling/encryption/impl/EncryptionImpl.cpp b/xmltooling/encryption/impl/EncryptionImpl.cpp index 1dd34a8..d5de5e4 100644 --- a/xmltooling/encryption/impl/EncryptionImpl.cpp +++ b/xmltooling/encryption/impl/EncryptionImpl.cpp @@ -286,7 +286,7 @@ namespace xmlencryption { IMPL_STRING_ATTRIB(Target); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) { setId(value); @@ -297,7 +297,7 @@ namespace xmlencryption { return; } } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value); + AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); } protected: diff --git a/xmltooling/security/OpenSSLTrustEngine.h b/xmltooling/security/OpenSSLTrustEngine.h index fc17190..f8d08bc 100644 --- a/xmltooling/security/OpenSSLTrustEngine.h +++ b/xmltooling/security/OpenSSLTrustEngine.h @@ -53,7 +53,30 @@ namespace xmltooling { public: virtual ~OpenSSLTrustEngine() {} - + + virtual bool validate( + xmlsignature::Signature& sig, + const CredentialResolver& credResolver, + CredentialCriteria* criteria=NULL + ) const=0; + + virtual bool validate( + const XMLCh* sigAlgorithm, + const char* sig, + xmlsignature::KeyInfo* keyInfo, + const char* in, + unsigned int in_len, + const CredentialResolver& credResolver, + CredentialCriteria* criteria=NULL + ) const=0; + + virtual bool validate( + XSECCryptoX509* certEE, + const std::vector& certChain, + const CredentialResolver& credResolver, + CredentialCriteria* criteria=NULL + ) const=0; + /** * Determines whether an X.509 credential is valid with respect to the * source of credentials supplied. diff --git a/xmltooling/security/X509TrustEngine.h b/xmltooling/security/X509TrustEngine.h index 2501ace..0d45321 100644 --- a/xmltooling/security/X509TrustEngine.h +++ b/xmltooling/security/X509TrustEngine.h @@ -49,7 +49,23 @@ namespace xmltooling { public: virtual ~X509TrustEngine() {} - + + virtual bool validate( + xmlsignature::Signature& sig, + const CredentialResolver& credResolver, + CredentialCriteria* criteria=NULL + ) const=0; + + virtual bool validate( + const XMLCh* sigAlgorithm, + const char* sig, + xmlsignature::KeyInfo* keyInfo, + const char* in, + unsigned int in_len, + const CredentialResolver& credResolver, + CredentialCriteria* criteria=NULL + ) const=0; + /** * Determines whether an X.509 credential is valid with respect to the * source of credentials supplied. diff --git a/xmltooling/soap/impl/SOAPImpl.cpp b/xmltooling/soap/impl/SOAPImpl.cpp index ebaeb91..2b33a47 100644 --- a/xmltooling/soap/impl/SOAPImpl.cpp +++ b/xmltooling/soap/impl/SOAPImpl.cpp @@ -227,14 +227,14 @@ namespace { IMPL_STRING_ATTRIB(EncodingStyle); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(QName& qualifiedName, const XMLCh* value, bool ID=false) { if (qualifiedName.hasNamespaceURI() && XMLString::equals(qualifiedName.getNamespaceURI(),SOAP11ENV_NS)) { if (XMLString::equals(qualifiedName.getLocalPart(),ENCODINGSTYLE_ATTRIB_NAME)) { setEncodingStyle(value); return; } } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value); + AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); } protected: @@ -291,7 +291,7 @@ namespace { IMPL_BOOLEAN_ATTRIB(MustUnderstand); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(QName& qualifiedName, const XMLCh* value, bool ID=false) { if (qualifiedName.hasNamespaceURI() && XMLString::equals(qualifiedName.getNamespaceURI(),SOAP11ENV_NS)) { if (XMLString::equals(qualifiedName.getLocalPart(),MUSTUNDERSTAND_ATTRIB_NAME)) { setMustUnderstand(value); @@ -302,7 +302,7 @@ namespace { return; } } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value); + AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); } protected: -- 2.1.4