Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Java
    • Security Level: Public (Public issues, viewable by everyone)
    • Labels:
      None
    • Environment:
      Operating System: Windows NT
      Platform: PC

      Description

      Created an attachment (id=25614)
      source code patch and new junit

      The constructor of XMLCipher is private which makes it impossible to subclass XMLCipher. Furthermore, much of the work to construct the XMLCipher instance is located in the getInstance() or getProviderInstance() methods. That would force a subclass to duplicate that code once again.

      The goal of this effort is to experiment with per KeyInfo KeyResolvers to resolve the Key Encryption Key dynamically based on the EncryptedKey/KeyInfo carried in the message. The junit in attachment shows how to achieve it through subclassing. This might not be the most obvious use of the API, but at least it proves that it can be done. It has the advantage that none of the API changes are controversial.

      The solution involves:

      • Making the XMLCipher constructor protected. Callers must still call one of the getInstance() or getProviderInstance() methods.
      • pushing all the construction code in getInstance() and getProviderInstance() into the real constructor.
      • relaxing the requirement that provider must not be null. Passing null for the provider in getProviderInstance() gives the same result as using the equivalent getInstance() method.
      • Adding createKeyInfo() and createEncryptedKeyResolver() factory methods in XMLCipher.
      • Changing XMLCipher to use the new factory methods when creating internal KeyInfo or EncryptedKeyResolver objects.
      • Adding the method createXMLCipher() to EncryptedKeyResolver.
      • Also added some test to @return keywords that were empty in XMLCipher

        Issue Links

          Activity

          Colm O hEigeartaigh made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Colm O hEigeartaigh made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Colm O hEigeartaigh made changes -
          Link This issue is superceded by SANTUARIO-305 [ SANTUARIO-305 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12565642 ] jira [ 12586419 ]
          Mark Thomas made changes -
          Assignee XML Security Developers Mailing List [ security-dev@xml.apache.org ]
          Mark Thomas made changes -
          Workflow jira [ 12539406 ] Default workflow, editable Closed status [ 12565642 ]
          Colm O hEigeartaigh made changes -
          Component/s Java [ 12314103 ]
          Component/s Encryption [ 12314099 ]
          Colm O hEigeartaigh made changes -
          Affects Version/s unspecified [ 12315949 ]
          Mark Thomas made changes -
          Field Original Value New Value
          issue.field.bugzillaimportkey 49465 12492501
          Clement Pellerin created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Clement Pellerin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development