Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

SANTUARIO-525 Made Base64 line length and line separator configurable… #19

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

peterdemaeyer
Copy link

@peterdemaeyer peterdemaeyer commented Feb 9, 2020

  • Made Base64 line length and separator configurable on XMLSecurityProperties.
  • Used a thread-local on XMLUtils to hold the Base64 parameters per thread. The alternative is to pass them as parameters to XMLUtils.encode, which is what I started doing at first, but it lead to a lot more code changes since the parameters have to be passed everywhere through the whole call stack. The approach with the thread-local seemed like a good alternative, certainly no worse than the configuration with the system property.
  • Removed some ad-hoc usages of the static calls to XMLUtils.ignoreLineBreaks and isIgnoreLineBreaks.
  • Deprecated both static methods ignoreLineBreaks and isIgnoreLineBreaks, because the new mechanism for configuring Base64 parameters is far more flexible. I considered removing those methods, but I decided not to because they're part of the public API of Santuario and it's probably not a good idea to remove them just yet.
  • Kept the default CRLF and system property for backward compatibility. I considered removing the system property, but decided not to because I didn't want to affect existing behavior too much. It would be best to remove it at some point though.
  • Added unit tests, including a test for concurrent usage.

…, such that "
" in Base64 encoded elements can be avoided
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant