You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2015/05/08 13:16:50 UTC
svn commit: r1678332 -
/santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
Author: coheigea
Date: Fri May 8 11:16:50 2015
New Revision: 1678332
URL: http://svn.apache.org/r1678332
Log:
Minor update to key decryption code
Modified:
santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
Modified: santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/xml/security/encryption/XMLCipher.java?rev=1678332&r1=1678331&r2=1678332&view=diff
==============================================================================
--- santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/xml/security/encryption/XMLCipher.java (original)
+++ santuario/xml-security-java/branches/1.5.x-fixes/src/main/java/org/apache/xml/security/encryption/XMLCipher.java Fri May 8 11:16:50 2015
@@ -1451,7 +1451,7 @@ public class XMLCipher {
*
* @param encryptedKey Previously loaded EncryptedKey that needs
* to be decrypted.
- * @param algorithm Algorithm for the decryption
+ * @param algorithm Algorithm for the decrypted key
* @return a key corresponding to the given type
* @throws XMLEncryptionException
*/
@@ -1480,7 +1480,7 @@ public class XMLCipher {
try {
String keyWrapAlg = encryptedKey.getEncryptionMethod().getAlgorithm();
String keyType = JCEMapper.getJCEKeyAlgorithmFromURI(keyWrapAlg);
- if ("RSA".equals(keyType)) {
+ if ("RSA".equals(keyType) || "EC".equals(keyType)) {
key = ki.getPrivateKey();
} else {
key = ki.getSecretKey();