You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by co...@apache.org on 2010/04/16 12:37:32 UTC
svn commit: r934737 -
/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoBase.java
Author: coheigea
Date: Fri Apr 16 10:37:32 2010
New Revision: 934737
URL: http://svn.apache.org/viewvc?rev=934737&view=rev
Log:
[WSS-227] - CryptoBase.getPrivateKey() unable to handle empty (null) passwords
- Suggested fix applied.
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoBase.java
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoBase.java?rev=934737&r1=934736&r2=934737&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoBase.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoBase.java Fri Apr 16 10:37:32 2010
@@ -228,7 +228,8 @@ public abstract class CryptoBase impleme
log.error(msg + logMsg);
throw new Exception(msg);
}
- Key keyTmp = keystore.getKey(alias, password.toCharArray());
+
+ Key keyTmp = keystore.getKey(alias, password == null ? new char[]{} : password.toCharArray());
if (!(keyTmp instanceof PrivateKey)) {
String msg = "Key is not a private key, alias: [" + alias + "]";
String logMsg = createKeyStoreErrorMessage(keystore);
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org