Uploaded image for project: 'Santuario'
  1. Santuario
  2. SANTUARIO-304

No way to distinguish DataReference from a KeyReference when iterating a ReferenceList

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java 1.4.6, Java 1.5.1
    • Java 1.5.2
    • Java
    • Security Level: Public (Public issues, viewable by everyone)
    • None

    Description

      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.

      Attachments

        1. santuario-304.zip
          21 kB
          Clement Pellerin

        Activity

          People

            coheigea Colm O hEigeartaigh
            clement_pellerin@ibi.com Clement Pellerin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: