You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2011/08/15 15:29:34 UTC

svn commit: r1157839 - /webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecEncryptedKey.java

Author: coheigea
Date: Mon Aug 15 13:29:34 2011
New Revision: 1157839

URL: http://svn.apache.org/viewvc?rev=1157839&view=rev
Log:
Fall back on the JCEName if it can't find the RequiredKey

Modified:
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecEncryptedKey.java

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecEncryptedKey.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecEncryptedKey.java?rev=1157839&r1=1157838&r2=1157839&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecEncryptedKey.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecEncryptedKey.java Mon Aug 15 13:29:34 2011
@@ -395,6 +395,9 @@ public class WSSecEncryptedKey extends W
             // Assume AES as default, so initialize it
             //
             String keyAlgorithm = JCEMapper.getJCEKeyAlgorithmFromURI(symEncAlgo);
+            if (keyAlgorithm == null || "".equals(keyAlgorithm)) {
+                keyAlgorithm = JCEMapper.translateURItoJCEID(symEncAlgo);
+            }
             KeyGenerator keyGen = KeyGenerator.getInstance(keyAlgorithm);
             if (symEncAlgo.equalsIgnoreCase(WSConstants.AES_128)) {
                 keyGen.init(128);