https://issues.shibboleth.net/jira/browse/CPPXT-90
[shibboleth/cpp-xmltooling.git] / xmltooling / security / impl / BasicX509Credential.cpp
index 93c99b2..a091d5b 100644 (file)
@@ -203,7 +203,7 @@ void BasicX509Credential::initKeyInfo(unsigned int types)
         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 @@ 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);
             }
         }