You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Clement Pellerin (Updated) (JIRA)" <ji...@apache.org> on 2012/03/14 20:56:41 UTC

[jira] [Updated] (SANTUARIO-301) Missing KeyInfo element when encrypting multiple elements

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

Clement Pellerin updated SANTUARIO-301:
---------------------------------------

    Attachment: TestBug.java

The attached sample shows how to reproduce the problem. Notice in the output that the KeyInfo element only appears within the last EncryptedData element.
                
> Missing KeyInfo element when encrypting multiple elements
> ---------------------------------------------------------
>
>                 Key: SANTUARIO-301
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-301
>             Project: Santuario
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: Java 1.5.1
>            Reporter: Clement Pellerin
>            Assignee: Colm O hEigeartaigh
>         Attachments: TestBug.java
>
>
> When encrypting multiple elements using the same XMLCipher, the KeyInfo that was attached to the EncryptedData only appears on the last encrypted element. This is because EncryptedDataImpl.toElement() calls getKeyInfo().getElement() which always returns the same KeyInfo Element. When the KeyInfo is added to the latest EncryptedData, it is reparented and therefore disappears from the previous EncryptedData.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira