[java-idp-testbed COMMIT] /trunk/src/test/java/idp/saml2/AbstractSAML2FlowTest.java

noreply at shibboleth.net noreply at shibboleth.net
Wed May 28 19:07:38 EDT 2014


Author: putmanb
Date: Wed May 28 19:07:37 2014
New Revision: 244

URL: http://svn.shibboleth.net/view/java-idp-testbed?rev=244&view=rev
Log:
Fix ChainingEncryptedKeyResolver constructor usage.

Modified:
    trunk/src/test/java/idp/saml2/AbstractSAML2FlowTest.java

Modified: trunk/src/test/java/idp/saml2/AbstractSAML2FlowTest.java
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/test/java/idp/saml2/AbstractSAML2FlowTest.java?rev=244&r1=243&r2=244&view=diff
==============================================================================
--- trunk/src/test/java/idp/saml2/AbstractSAML2FlowTest.java (original)
+++ trunk/src/test/java/idp/saml2/AbstractSAML2FlowTest.java Wed May 28 19:07:37 2014
@@ -19,6 +19,7 @@
 
 import idp.AbstractFlowTest;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -50,6 +51,7 @@
 import org.opensaml.security.credential.Credential;
 import org.opensaml.xmlsec.encryption.support.ChainingEncryptedKeyResolver;
 import org.opensaml.xmlsec.encryption.support.DecryptionException;
+import org.opensaml.xmlsec.encryption.support.EncryptedKeyResolver;
 import org.opensaml.xmlsec.encryption.support.InlineEncryptedKeyResolver;
 import org.opensaml.xmlsec.keyinfo.impl.StaticKeyInfoCredentialResolver;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -68,9 +70,10 @@
     @Qualifier("sp.Credential") @Autowired private Credential spCredential;
     
     private Assertion decryptAssertion(final EncryptedAssertion encrypted) throws DecryptionException {
-        final ChainingEncryptedKeyResolver chain = new ChainingEncryptedKeyResolver();
-        chain.getResolverChain().add(new InlineEncryptedKeyResolver());
-        chain.getResolverChain().add(new EncryptedElementTypeEncryptedKeyResolver());
+        ArrayList<EncryptedKeyResolver> resolverChain = new ArrayList<>();
+        resolverChain.add(new InlineEncryptedKeyResolver());
+        resolverChain.add(new EncryptedElementTypeEncryptedKeyResolver());
+        final ChainingEncryptedKeyResolver chain = new ChainingEncryptedKeyResolver(resolverChain);
         final Decrypter decrypter =
                 new Decrypter(null, new StaticKeyInfoCredentialResolver(spCredential), chain);
         return decrypter.decrypt(encrypted);



More information about the commits mailing list