[cpp-xmltooling] branch main updated: CPPXT-162 - Defaults to RSA-SHA1 as signing algorithm

Scott Cantor cantor.2 at osu.edu
Mon Sep 9 16:31:32 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository cpp-xmltooling.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=f14c0366a37b457c6ad8732aa31c721669b746a2

The following commit(s) were added to refs/heads/main by this push:
     new f14c036  CPPXT-162 - Defaults to RSA-SHA1 as signing algorithm
f14c036 is described below

commit f14c0366a37b457c6ad8732aa31c721669b746a2
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Sep 9 12:31:05 2024 -0400

    CPPXT-162 - Defaults to RSA-SHA1 as signing algorithm
    
    https://shibboleth.atlassian.net/browse/CPPXT-162
---
 xmltooling/signature/impl/XMLSecSignatureImpl.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/xmltooling/signature/impl/XMLSecSignatureImpl.cpp b/xmltooling/signature/impl/XMLSecSignatureImpl.cpp
index 14b11f2..a14945e 100644
--- a/xmltooling/signature/impl/XMLSecSignatureImpl.cpp
+++ b/xmltooling/signature/impl/XMLSecSignatureImpl.cpp
@@ -392,8 +392,13 @@ DOMElement* XMLSecSignatureImpl::marshall(DOMElement* parentElement, const vecto
         DSIGSignature* temp=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newSignature();
         temp->setDSIGNSPrefix(XMLSIG_PREFIX);
         const XMLCh* alg = getSignatureAlgorithm();
-        if (!alg)
+        if (!alg) {
+#ifdef XSEC_OPENSSL_HAVE_SHA2 
+            alg = DSIGConstants::s_unicodeStrURIRSA_SHA256;
+#else
             alg = DSIGConstants::s_unicodeStrURIRSA_SHA1;
+#endif
+        }
         cachedDOM=temp->createBlankSignature(parentElement->getOwnerDocument(), getCanonicalizationMethod(), alg);
         m_signature = temp;
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list