You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Colm O hEigeartaigh (Jira)" <ji...@apache.org> on 2026/05/18 15:09:00 UTC

[jira] [Resolved] (SANTUARIO-631) Add more configuration options for Base64

     [ https://issues.apache.org/jira/browse/SANTUARIO-631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh resolved SANTUARIO-631.
-------------------------------------------
    Resolution: Fixed

> Add more configuration options for Base64
> -----------------------------------------
>
>                 Key: SANTUARIO-631
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-631
>             Project: Santuario
>          Issue Type: Improvement
>            Reporter: Colm O hEigeartaigh
>            Assignee: Colm O hEigeartaigh
>            Priority: Major
>             Fix For: Java 4.0.5
>
>
> This PR continues [the mailing list thread|https://lists.apache.org/thread/d285pdhjz5mfhcmbrglzkn6qthsyyxjr] and suggests system properties to control base64Binary values formatting:
>  * {{{}org.apache.xml.security.base64.lineSeparator{}}}, {{org.apache.xml.security.base64.lineLength}} - allows to override default MIME encoding settings
>  * {{org.apache.xml.security.base64.ignoreLineBreaks}} - disables line wrapping for base64 value, but allows to keep the whole XML pretty-printed. Takes precedence over line wrapping settings above.
>  * existing {{org.apache.xml.security.ignoreLineBreaks}} takes precedence over all new options.
> Default values result to CRLF line breaks with 76 chars in the line, making the whole thing fully compatible with previous implementation.
> h3. Other changes
> Some of the logic is included to XMLUtils to provide better encapsulation:
>  * adding line breaks in the beginning and in the end of wrapped base64 values in the element is implemented as {{XMLUtils.encodeElementValue}}
>  * {{Base64OutputStream}} from Commons, used in XML encryption, is replaced with a {{java.util}} implementation and provided by {{{}XMLUtils{}}}, making it consistent with configured Base64 encoder.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)