[cpp-xmltooling COMMIT] in /branches/REL_1/xmltooling: security/impl/BasicX509Credential.cpp signature/impl/KeyInfoIm...

noreply at shibboleth.net noreply at shibboleth.net
Wed Sep 12 14:52:28 EDT 2012


Author: scantor
Date: Wed Sep 12 14:52:28 2012
New Revision: 997

URL: http://svn.shibboleth.net/view/cpp-xmltooling?rev=997&view=rev
Log:
https://issues.shibboleth.net/jira/browse/CPPXT-90

Modified:
    branches/REL_1/xmltooling/security/impl/BasicX509Credential.cpp
    branches/REL_1/xmltooling/signature/impl/KeyInfoImpl.cpp

Modified: branches/REL_1/xmltooling/security/impl/BasicX509Credential.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/security/impl/BasicX509Credential.cpp?rev=997&r1=996&r2=997&view=diff
==============================================================================
--- branches/REL_1/xmltooling/security/impl/BasicX509Credential.cpp (original)
+++ branches/REL_1/xmltooling/security/impl/BasicX509Credential.cpp Wed Sep 12 14:52:28 2012
@@ -203,7 +203,7 @@
         xsecsize_t x;
         XMLByte* decoded = Base64::decode(reinterpret_cast<const XMLByte*>(buf.rawCharBuffer()), &x);
         if (decoded) {
-            string xdig = SecurityHelper::doHash("SHA1", reinterpret_cast<char*>(decoded), x);
+            string xdig = SecurityHelper::doHash("SHA1", reinterpret_cast<char*>(decoded), x, false);
 #ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE
             XMLString::release(&decoded);
 #else
@@ -219,6 +219,7 @@
 #endif
                 X509Digest* x509dig = X509DigestBuilder::buildX509Digest();
                 x509dig->setValue(widenit.get());
+                x509dig->setAlgorithm(DSIGConstants::s_unicodeStrURISHA1);
                 m_compactKeyInfo->getX509Datas().front()->getX509Digests().push_back(x509dig);
             }
         }

Modified: branches/REL_1/xmltooling/signature/impl/KeyInfoImpl.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/signature/impl/KeyInfoImpl.cpp?rev=997&r1=996&r2=997&view=diff
==============================================================================
--- branches/REL_1/xmltooling/signature/impl/KeyInfoImpl.cpp (original)
+++ branches/REL_1/xmltooling/signature/impl/KeyInfoImpl.cpp Wed Sep 12 14:52:28 2012
@@ -557,7 +557,7 @@
     };
 
     class XMLTOOL_DLLLOCAL X509DigestImpl : public virtual X509Digest,
-        public AbstractComplexElement,
+        public AbstractSimpleElement,
         public AbstractDOMCachingXMLObject,
         public AbstractXMLObjectMarshaller,
         public AbstractXMLObjectUnmarshaller
@@ -572,7 +572,7 @@
         }
 
         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);
         }
 



More information about the commits mailing list