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:35:52 UTC
svn commit: r934734 -
/webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/components/crypto/CryptoBase.java
Author: coheigea
Date: Fri Apr 16 10:35:52 2010
New Revision: 934734
URL: http://svn.apache.org/viewvc?rev=934734&view=rev
Log:
[WSS-227] - CryptoBase.getPrivateKey() unable to handle empty (null) passwords
- Suggested fix applied.
Modified:
webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/components/crypto/CryptoBase.java
Modified: webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/components/crypto/CryptoBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/components/crypto/CryptoBase.java?rev=934734&r1=934733&r2=934734&view=diff
==============================================================================
--- webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/components/crypto/CryptoBase.java (original)
+++ webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/components/crypto/CryptoBase.java Fri Apr 16 10:35:52 2010
@@ -213,7 +213,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