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 2021/09/08 10:59:52 UTC
[santuario-xml-security-java] branch 2.2.x-fixes updated:
SANTUARIO-579 - Support SHA-224 as an MGFAlgorithm during encryption
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch 2.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/santuario-xml-security-java.git
The following commit(s) were added to refs/heads/2.2.x-fixes by this push:
new 27f88f1 SANTUARIO-579 - Support SHA-224 as an MGFAlgorithm during encryption
27f88f1 is described below
commit 27f88f1cac674cffd5af143559a31be11fdcc844
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Wed Sep 8 11:58:47 2021 +0100
SANTUARIO-579 - Support SHA-224 as an MGFAlgorithm during encryption
---
src/main/java/org/apache/xml/security/encryption/XMLCipher.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/xml/security/encryption/XMLCipher.java b/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
index e0bacba..5fe7a9a 100644
--- a/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
+++ b/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
@@ -1523,7 +1523,9 @@ public class XMLCipher {
MGF1ParameterSpec mgfParameterSpec = new MGF1ParameterSpec("SHA-1");
if (XMLCipher.RSA_OAEP_11.equals(encryptionAlgorithm)) {
- if (EncryptionConstants.MGF1_SHA256.equals(mgfAlgorithm)) {
+ if (EncryptionConstants.MGF1_SHA224.equals(mgfAlgorithm)) {
+ mgfParameterSpec = new MGF1ParameterSpec("SHA-224");
+ } else if (EncryptionConstants.MGF1_SHA256.equals(mgfAlgorithm)) {
mgfParameterSpec = new MGF1ParameterSpec("SHA-256");
} else if (EncryptionConstants.MGF1_SHA384.equals(mgfAlgorithm)) {
mgfParameterSpec = new MGF1ParameterSpec("SHA-384");