[java-opensaml] branch main updated: OSJ-315: Update xmlsec to 2.3

Brent Putman putmanb at georgetown.edu
Fri Mar 25 03:16:55 UTC 2022


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

putmanb pushed a commit to branch main
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=6afc0c92a896021a76301c5f82e1cf1185aa300a

The following commit(s) were added to refs/heads/main by this push:
     new 6afc0c92a OSJ-315: Update xmlsec to 2.3
6afc0c92a is described below

commit 6afc0c92a896021a76301c5f82e1cf1185aa300a
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Thu Mar 24 23:15:52 2022 -0400

    OSJ-315: Update xmlsec to 2.3
    
    Fix test broken by removal of default resource resolvers.
---
 .../xmlsec/signature/support/tests/DetachedSignatureTest.java       | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/signature/support/tests/DetachedSignatureTest.java b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/signature/support/tests/DetachedSignatureTest.java
index 8393b3982..9c98e433b 100644
--- a/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/signature/support/tests/DetachedSignatureTest.java
+++ b/opensaml-xmlsec-impl/src/test/java/org/opensaml/xmlsec/signature/support/tests/DetachedSignatureTest.java
@@ -19,6 +19,8 @@ package org.opensaml.xmlsec.signature.support.tests;
 
 import java.security.KeyPair;
 
+import org.apache.xml.security.utils.resolver.ResourceResolver;
+import org.apache.xml.security.utils.resolver.implementations.ResolverDirectHTTP;
 import org.opensaml.core.testing.XMLObjectBaseTestCase;
 import org.opensaml.core.xml.XMLObjectBuilder;
 import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport;
@@ -132,6 +134,10 @@ public class DetachedSignatureTest extends XMLObjectBaseTestCase {
      */
     @Test
     public void testExternalSignatureAndVerification() throws MarshallingException, SignatureException {
+        // This is necessary as of Santuario 2.3.0, which removed the -DirectHTTP and -LocalFilesystem resolvers by default.
+        // Unfortunately it's stored in static storage and no way to clear or reset after the test.
+        ResourceResolver.register(new ResolverDirectHTTP(), false);
+        
         Signature signature = sigBuilder.buildObject(Signature.DEFAULT_ELEMENT_NAME);
         signature.setSigningCredential(goodCredential);
         signature.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS);

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


More information about the commits mailing list