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 2025/11/28 09:53:32 UTC

(santuario-xml-security-java) branch 3.0.x-fixes updated (fb929665 -> 75d790e7)

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a change to branch 3.0.x-fixes
in repository https://gitbox.apache.org/repos/asf/santuario-xml-security-java.git


    from fb929665 Bump org.apache.maven.plugins:maven-release-plugin from 3.1.1 to 3.2.0 (#542)
     new 1093721e Bump org.bouncycastle:bcprov-jdk18on from 1.82 to 1.83 (#545)
     new 75d790e7 Removing deprecated commons codec API calls

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                            |  2 +-
 .../input/AbstractDecryptInputProcessor.java       |  5 +++-
 .../output/AbstractEncryptOutputProcessor.java     | 11 +++++----
 .../impl/transformer/TransformBase64Decode.java    | 28 +++++++++++++++-------
 4 files changed, 32 insertions(+), 14 deletions(-)


(santuario-xml-security-java) 02/02: Removing deprecated commons codec API calls

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.0.x-fixes
in repository https://gitbox.apache.org/repos/asf/santuario-xml-security-java.git

commit 75d790e780cf09575dca23d5db63078a5d035989
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Fri Nov 28 09:45:28 2025 +0000

    Removing deprecated commons codec API calls
---
 .../input/AbstractDecryptInputProcessor.java       |  5 +++-
 .../output/AbstractEncryptOutputProcessor.java     | 11 +++++----
 .../impl/transformer/TransformBase64Decode.java    | 28 +++++++++++++++-------
 3 files changed, 31 insertions(+), 13 deletions(-)

diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java
index c7c738b0..cd6d4501 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java
@@ -845,7 +845,10 @@ public abstract class AbstractDecryptInputProcessor extends AbstractInputProcess
                 //buffering seems not to help
                 //bufferedOutputStream = new BufferedOutputStream(new Base64OutputStream(ivSplittingOutputStream, false), 8192 * 5);
                 ReplaceableOuputStream replaceableOuputStream = new ReplaceableOuputStream(ivSplittingOutputStream);    //NOPMD
-                OutputStream base64OutputStream = new Base64OutputStream(replaceableOuputStream, false); //NOPMD
+                OutputStream base64OutputStream = Base64OutputStream.builder() //NOPMD
+                        .setOutputStream(replaceableOuputStream)
+                        .setEncode(false)
+                        .get();
                 ivSplittingOutputStream.setParentOutputStream(replaceableOuputStream);
                 OutputStreamWriter outputStreamWriter = //NOPMD
                         new OutputStreamWriter(base64OutputStream,
diff --git a/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractEncryptOutputProcessor.java b/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractEncryptOutputProcessor.java
index efa2fa5a..5d6047b3 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractEncryptOutputProcessor.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractEncryptOutputProcessor.java
@@ -40,6 +40,7 @@ import javax.xml.stream.XMLEventWriter;
 import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 
+import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.codec.binary.Base64OutputStream;
 import org.apache.xml.security.algorithms.JCEMapper;
 import org.apache.xml.security.encryption.XMLCipherUtil;
@@ -175,12 +176,14 @@ public abstract class AbstractEncryptOutputProcessor extends AbstractOutputProce
                 symmetricCipher.init(Cipher.ENCRYPT_MODE, encryptionPartDef.getSymmetricKey(), parameterSpec);
 
                 characterEventGeneratorOutputStream = new CharacterEventGeneratorOutputStream();
-                Base64OutputStream base64EncoderStream = null;  //NOPMD
+                Base64OutputStream.Builder builder = Base64OutputStream.builder()
+                        .setOutputStream(characterEventGeneratorOutputStream)
+                        .setEncode(true);
                 if (XMLUtils.isIgnoreLineBreaks()) {
-                    base64EncoderStream = new Base64OutputStream(characterEventGeneratorOutputStream, true, 0, null);
-                } else {
-                    base64EncoderStream = new Base64OutputStream(characterEventGeneratorOutputStream, true);
+                    builder.setBaseNCodec(Base64.builder().setLineLength(0).setLineSeparator(null).get());
                 }
+
+                Base64OutputStream base64EncoderStream = builder.get();  //NOPMD
                 base64EncoderStream.write(iv);
 
                 OutputStream outputStream = new CipherOutputStream(base64EncoderStream, symmetricCipher);   //NOPMD
diff --git a/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformBase64Decode.java b/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformBase64Decode.java
index 8f72f5a9..d06717f5 100644
--- a/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformBase64Decode.java
+++ b/src/main/java/org/apache/xml/security/stax/impl/transformer/TransformBase64Decode.java
@@ -43,16 +43,17 @@ public class TransformBase64Decode extends TransformIdentity {
 
     @Override
     public void setOutputStream(OutputStream outputStream) throws XMLSecurityException {
-        super.setOutputStream(new Base64OutputStream(
-                new FilterOutputStream(outputStream) {
+        OutputStream base64OutputStream = Base64OutputStream.builder() //NOPMD
+                .setOutputStream(new FilterOutputStream(outputStream) {
                     @Override
                     public void close() throws IOException {
                         //do not close the parent output stream!
                         super.flush();
                     }
-                },
-                false)
-        );
+                })
+                .setEncode(false)
+                .get();
+        super.setOutputStream(base64OutputStream);
     }
 
     @Override
@@ -96,7 +97,11 @@ public class TransformBase64Decode extends TransformIdentity {
                             public void transform(Object object) throws XMLStreamException {
                                 if (base64OutputStream == null) {
                                     byteArrayOutputStream = new UnsyncByteArrayOutputStream();
-                                    base64OutputStream = new Base64OutputStream(byteArrayOutputStream, false);
+                                    base64OutputStream =
+                                        Base64OutputStream.builder()
+                                            .setOutputStream(byteArrayOutputStream)
+                                            .setEncode(false)
+                                            .get();
                                 }
                                 try {
                                     base64OutputStream.write((byte[]) object);
@@ -139,7 +144,10 @@ public class TransformBase64Decode extends TransformIdentity {
                             public void transform(Object object) throws XMLStreamException {
                                 if (base64OutputStream == null) {
                                     byteArrayOutputStream = new UnsyncByteArrayOutputStream();
-                                    base64OutputStream = new Base64OutputStream(byteArrayOutputStream, false);
+                                    base64OutputStream = Base64OutputStream.builder()
+                                            .setOutputStream(byteArrayOutputStream)
+                                            .setEncode(false)
+                                            .get();
                                 }
                                 try {
                                     base64OutputStream.write((byte[]) object);
@@ -177,7 +185,11 @@ public class TransformBase64Decode extends TransformIdentity {
         if (getOutputStream() != null) {
             super.transform(inputStream);
         } else {
-            super.transform(new Base64InputStream(inputStream, false));
+            InputStream base64InputStream = Base64InputStream.builder() //NOPMD
+                    .setInputStream(inputStream)
+                    .setEncode(false)
+                    .get();
+            super.transform(base64InputStream);
         }
     }
 


(santuario-xml-security-java) 01/02: Bump org.bouncycastle:bcprov-jdk18on from 1.82 to 1.83 (#545)

Posted by co...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.0.x-fixes
in repository https://gitbox.apache.org/repos/asf/santuario-xml-security-java.git

commit 1093721e1d1cac6abe4ef53fb0c61e8d18d1c72b
Author: dependabot[bot] <49...@users.noreply.github.com>
AuthorDate: Fri Nov 28 09:12:00 2025 +0000

    Bump org.bouncycastle:bcprov-jdk18on from 1.82 to 1.83 (#545)
    
    Bumps [org.bouncycastle:bcprov-jdk18on](https://github.com/bcgit/bc-java) from 1.82 to 1.83.
    - [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html)
    - [Commits](https://github.com/bcgit/bc-java/commits)
    
    ---
    updated-dependencies:
    - dependency-name: org.bouncycastle:bcprov-jdk18on
      dependency-version: '1.83'
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <su...@github.com>
    Co-authored-by: dependabot[bot] <49...@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b585f020..e90abba9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,7 +88,7 @@
     </distributionManagement>
 
     <properties>
-        <bcprov.version>1.82</bcprov.version>
+        <bcprov.version>1.83</bcprov.version>
         <clirr.version>2.8</clirr.version>
         <commons.codec.version>1.20.0</commons.codec.version>
         <hamcrest.version>2.2</hamcrest.version>