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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]