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:11 UTC

[santuario-xml-security-java] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/santuario-xml-security-java.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b74421  SANTUARIO-579 - Support SHA-224 as an MGFAlgorithm during encryption
6b74421 is described below

commit 6b744218b6ad5964b08b1787d686e573c034335d
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 1b77490..0e57f8f 100644
--- a/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
+++ b/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
@@ -1522,7 +1522,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");