You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by di...@apache.org on 2007/03/05 16:34:45 UTC
svn commit: r514691 -
/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java
Author: dims
Date: Mon Mar 5 07:34:44 2007
New Revision: 514691
URL: http://svn.apache.org/viewvc?view=rev&rev=514691
Log:
Fix for WSS-72 - WSSecEncryptedKey rejects a conformant cipher when its getBlockSize() returns 0
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java?view=diff&rev=514691&r1=514690&r2=514691
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java Mon Mar 5 07:34:44 2007
@@ -197,7 +197,8 @@
log.debug("cipher blksize: " + cipher.getBlockSize()
+ ", symm key length: " + keyBytes.length);
}
- if (cipher.getBlockSize() < keyBytes.length) {
+ int blockSize = cipher.getBlockSize();
+ if (blockSize > 0 && blockSize < keyBytes.length) {
throw new WSSecurityException(WSSecurityException.FAILURE,
"unsupportedKeyTransp",
new Object[] { "public key algorithm too weak to encrypt "
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org