ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1157839 - /webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/WSSecEncryptedKey.java
Date Mon, 15 Aug 2011 13:29:34 GMT
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);



Mime
View raw message