Support alternate hash algorithms in helper routines.
[shibboleth/cpp-xmltooling.git] / xmltoolingtest / SecurityHelperTest.h
index e5812a6..3b7640c 100644 (file)
@@ -96,6 +96,11 @@ public:
             SecurityHelper::getDEREncoding(*certs[2], true), SecurityHelper::getDEREncoding(*key1.get(), true)
             );
 
+        TSM_ASSERT_EQUALS(
+            "Certificate and its key produced different hashed encodings",
+            SecurityHelper::getDEREncoding(*certs[2], true, true, "SHA256"), SecurityHelper::getDEREncoding(*key1.get(), true, true, "SHA256")
+            );
+
         for_each(certs.begin(), certs.end(), xmltooling::cleanup<XSECCryptoX509>());
         certs.clear();
     }