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 ru...@apache.org on 2007/10/22 14:43:16 UTC
svn commit: r587074 -
/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java
Author: ruchithf
Date: Mon Oct 22 05:43:15 2007
New Revision: 587074
URL: http://svn.apache.org/viewvc?rev=587074&view=rev
Log:
Making sure we can use certificates with key usage restrictions to
create the encrypted key
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?rev=587074&r1=587073&r2=587074&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecEncryptedKey.java Mon Oct 22 05:43:15 2007
@@ -188,7 +188,7 @@
String certUri = "EncCertId-" + remoteCert.hashCode();
Cipher cipher = WSSecurityUtil.getCipherInstance(keyEncAlgo);
try {
- cipher.init(Cipher.ENCRYPT_MODE, remoteCert);
+ cipher.init(Cipher.ENCRYPT_MODE, remoteCert.getPublicKey());
} catch (InvalidKeyException e) {
throw new WSSecurityException(WSSecurityException.FAILED_ENC_DEC,
null, null, e);
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org