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 2020/06/10 11:40:00 UTC
[jira] [Resolved] (SANTUARIO-551) XMLSignatureInput.getBytes()
returns an empty array when nothing is canonicalized
[ https://issues.apache.org/jira/browse/SANTUARIO-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colm O hEigeartaigh resolved SANTUARIO-551.
-------------------------------------------
Resolution: Fixed
> XMLSignatureInput.getBytes() returns an empty array when nothing is canonicalized
> ---------------------------------------------------------------------------------
>
> Key: SANTUARIO-551
> URL: https://issues.apache.org/jira/browse/SANTUARIO-551
> Project: Santuario
> Issue Type: Bug
> Components: Java
> Affects Versions: Java 2.2.0
> Reporter: Pierrick Vandenbroucke
> Assignee: Colm O hEigeartaigh
> Priority: Major
> Fix For: Java 2.2.1
>
>
> Hello,
> we have some troubles with the migration from Santuario 2.15 to 2.2.0. The way to process the canonicalization changed and we are not able to make a distinction between nothing is canonicalized and an empty result of the canonicalization.
> That seems related to the ticket SANTUARIO-521 and the change impacts methods {{org.apache.xml.security.signature.XMLSignatureInput.getBytes()}} (and {{org.apache.xml.security.signature.Reference.getReferencedBytes()}})
> Below you can find an unit test which passes with Santuario 2.1.5 and fails with the upgraded version.
> {code:java}
> @Test
> public void test() throws Exception {
> MessageDigest md = MessageDigest.getInstance("SHA-256");
> byte[] digest = md.digest("Hello world!".getBytes());
> XMLSignatureInput input = new XMLSignatureInput(Base64.getEncoder().encodeToString(digest));
> assertNull(input.getBytes());
> }
> {code}
> Regards,
> Pierrick
--
This message was sent by Atlassian Jira
(v8.3.4#803005)