Author: coheigea
Date: Mon Aug 15 14:03:06 2011
New Revision: 1157851

URL: http://svn.apache.org/viewvc?rev=1157851&view=rev
Log:
Disabling the ability to set the KeySize

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=1157851&r1=1157850&r2=1157851&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 14:03:06 2011
@@ -127,12 +127,6 @@ public class WSSecEncryptedKey extends W
     
     protected X509Certificate useThisCert = null;
     
-    /**
-     * Key size in bits
-     * Defaults to 128
-     */
-    protected int keySize = 128;
-    
     public WSSecEncryptedKey() {
         super();
     }
@@ -405,8 +399,6 @@ public class WSSecEncryptedKey extends W
                 keyGen.init(192);
             } else if (symEncAlgo.equalsIgnoreCase(WSConstants.AES_256)) {
                 keyGen.init(256);
-            } else {
-                keyGen.init(keySize);
             }
             return keyGen;
         } catch (NoSuchAlgorithmException e) {
@@ -554,14 +546,6 @@ public class WSSecEncryptedKey extends W
         return null;
     }
     
-    public void setKeySize(int keySize) throws WSSecurityException {
-        if (keySize < 64) {
-            // Minimum size has to be 64 bits - E.g. A DES key
-            throw new WSSecurityException("invalidKeySize");
-        }
-        this.keySize = keySize;
-    }
-
     public void setKeyEncAlgo(String keyEncAlgo) {
         this.keyEncAlgo = keyEncAlgo;
     }


Reply via email to