Clean up hash options in DER API.
authorScott Cantor <cantor.2@osu.edu>
Mon, 2 Nov 2009 16:38:02 +0000 (16:38 +0000)
committerScott Cantor <cantor.2@osu.edu>
Mon, 2 Nov 2009 16:38:02 +0000 (16:38 +0000)
shibsp/attribute/KeyInfoAttributeDecoder.cpp
shibsp/attribute/resolver/impl/KeyDescriptorAttributeExtractor.cpp

index 182e082..b566302 100644 (file)
@@ -59,7 +59,7 @@ namespace shibsp {
                 if (!alg || !*alg)
                     alg = "SHA1";
                 dest.push_back(string());
-                dest.back() = SecurityHelper::getDEREncoding(*cred.get(), m_hash, true, alg);
+                dest.back() = SecurityHelper::getDEREncoding(*cred.get(), m_hash ? alg : NULL);
                 if (dest.back().empty())
                     dest.pop_back();
             }
index 9729e82..0cb4142 100644 (file)
@@ -142,7 +142,7 @@ void KeyDescriptorExtractor::extractAttributes(
                 for (vector<const Credential*>::const_iterator c = creds.begin(); c != creds.end(); ++c) {
                     if (vals.empty() || !vals.back().empty())
                         vals.push_back(string());
-                    vals.back() = SecurityHelper::getDEREncoding(*(*c), true, true, alg);
+                    vals.back() = SecurityHelper::getDEREncoding(*(*c), alg);
                 }
                 if (vals.back().empty())
                     vals.pop_back();