From: Scott Cantor Date: Wed, 12 Sep 2012 18:52:28 +0000 (+0000) Subject: https://issues.shibboleth.net/jira/browse/CPPXT-90 X-Git-Tag: 1.5.2~21 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=d1c1478d26cfd9b87a4deb80c3638dc42e111735 https://issues.shibboleth.net/jira/browse/CPPXT-90 --- diff --git a/xmltooling/security/impl/BasicX509Credential.cpp b/xmltooling/security/impl/BasicX509Credential.cpp index 93c99b2..a091d5b 100644 --- a/xmltooling/security/impl/BasicX509Credential.cpp +++ b/xmltooling/security/impl/BasicX509Credential.cpp @@ -203,7 +203,7 @@ void BasicX509Credential::initKeyInfo(unsigned int types) xsecsize_t x; XMLByte* decoded = Base64::decode(reinterpret_cast(buf.rawCharBuffer()), &x); if (decoded) { - string xdig = SecurityHelper::doHash("SHA1", reinterpret_cast(decoded), x); + string xdig = SecurityHelper::doHash("SHA1", reinterpret_cast(decoded), x, false); #ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE XMLString::release(&decoded); #else @@ -219,6 +219,7 @@ void BasicX509Credential::initKeyInfo(unsigned int types) #endif X509Digest* x509dig = X509DigestBuilder::buildX509Digest(); x509dig->setValue(widenit.get()); + x509dig->setAlgorithm(DSIGConstants::s_unicodeStrURISHA1); m_compactKeyInfo->getX509Datas().front()->getX509Digests().push_back(x509dig); } } diff --git a/xmltooling/signature/impl/KeyInfoImpl.cpp b/xmltooling/signature/impl/KeyInfoImpl.cpp index a260727..910267c 100644 --- a/xmltooling/signature/impl/KeyInfoImpl.cpp +++ b/xmltooling/signature/impl/KeyInfoImpl.cpp @@ -557,7 +557,7 @@ namespace xmlsignature { }; class XMLTOOL_DLLLOCAL X509DigestImpl : public virtual X509Digest, - public AbstractComplexElement, + public AbstractSimpleElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller @@ -572,7 +572,7 @@ namespace xmlsignature { } X509DigestImpl(const X509DigestImpl& src) - : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src), m_Algorithm(nullptr) { + : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src), m_Algorithm(nullptr) { IMPL_CLONE_ATTRIB(Algorithm); }