[java-opensaml COMMIT] /trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java

noreply at shibboleth.net noreply at shibboleth.net
Wed Sep 24 20:48:44 EDT 2014


Author: putmanb
Date: Wed Sep 24 20:48:44 2014
New Revision: 4062

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4062&view=rev
Log:
OSJ-90: Remove outdated Decrypter enforcement check of SHA-1 DigestMethod on RSA-OAEP.  Newer Santuario supports all defined digest methods.

Modified:
    trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java

Modified: trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java?rev=4062&r1=4061&r2=4062&view=diff
==============================================================================
--- trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java (original)
+++ trunk/opensaml-xmlsec-api/src/main/java/org/opensaml/xmlsec/encryption/support/Decrypter.java Wed Sep 24 20:48:44 2014
@@ -736,24 +736,7 @@
     protected void preProcessEncryptedKey(@Nonnull final EncryptedKey encryptedKey, @Nonnull final String algorithm,
             @Nonnull final Key kek) throws DecryptionException {
         
-        // Apache XML-Security currently only supports an internal, hard-coded default
-        // SHA-1 digest method with RSA-OAEP key transport.
-        String keyTransportAlgorithm = encryptedKey.getEncryptionMethod().getAlgorithm();
-        if (EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP.equals(keyTransportAlgorithm)) {
-            List<XMLObject> digestMethods = 
-                encryptedKey.getEncryptionMethod().getUnknownXMLObjects(DigestMethod.DEFAULT_ELEMENT_NAME);
-            if (!digestMethods.isEmpty()) {
-                DigestMethod dm = (DigestMethod) digestMethods.get(0);
-                if (! SignatureConstants.ALGO_ID_DIGEST_SHA1
-                        .equals(StringSupport.trimOrNull(dm.getAlgorithm())) ) {
-                    log.error("EncryptedKey/EncryptionMethod/DigestMethod contains unsupported algorithm URI: {}",
-                            dm.getAlgorithm());
-                    throw new DecryptionException(
-                            "EncryptedKey/EncryptionMethod/DigestMethod contains unsupported algorithm URI");
-                }
-            }
-        }
-        
+        // No-op for now.  Subclasses can do things here if they want.
     }
 
     /**



More information about the commits mailing list