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 (Commented) (JIRA)" <ji...@apache.org> on 2012/03/20 10:13:40 UTC

[jira] [Commented] (SANTUARIO-304) No way to distinguish DataReference from a KeyReference when iterating a ReferenceList

    [ https://issues.apache.org/jira/browse/SANTUARIO-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13233321#comment-13233321 ] 

Colm O hEigeartaigh commented on SANTUARIO-304:
-----------------------------------------------

Hi Clement,

Could you submit a patch for this issue?

Colm.
                
> No way to distinguish DataReference from a KeyReference when iterating a ReferenceList
> --------------------------------------------------------------------------------------
>
>                 Key: SANTUARIO-304
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-304
>             Project: Santuario
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: Java 1.4.6, Java 1.5.1
>            Reporter: Clement Pellerin
>            Assignee: Colm O hEigeartaigh
>
> An EncryptedKey can contain a ReferenceList that points to the EncryptedData.
> WS-Security also extends XML Encryption to allow an independent ReferenceList.
> The goal is to iterate over the ReferenceList to know which elements must be decrypted.
> ReferenceList.getReferences() returns an Iterator<Reference> that can enumerate the references.
> Unfortunately, there is no way to determine whether the Reference is a DataReference or a KeyReference.
> Both DataReference and KeyReference classes are private so instanceof does not work.
> The Reference interface does not contain a method to return the type a la org.w3c.dom.Node.getNodeType()
> It is too ugly to compare the class name to DataReferenceImpl, so the only work-around is to reparse the ReferenceList by hand.

--
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