Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6733443

JCA/JCE init does not completely reset the delayed provider selection mechanism.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P4
    • None
    • 7
    • security-libs

    Description

      I wrote:
      The PKCS11 provider document makes a statement about the delayed
      selection mechanism that I think is wrong given the implementation.
      It claims that for Cipher, KeyAgreement, Mac, etc.:

          If an application calls the initialization method multiple times
          (each time with a different key, for example), the proper provider
          for the given key is selected each time. In other words, a
          different provider may be selected for each initialization call.

      Was it the intent, and the code in Cipher is wrong? Or are the docs wrong, and need to be fixed?

      Sean thought he remembers that was the original intent, but wasn't sure.
      -----

      Andreas responded:
      After some back and forth, this was the intent, but the implementation
      never got updated to reflect that. Basically, calling init() should
      erase all existing state and give the same result as if called on a
      new object.
      -----

      Andreas thinks there may be a fairly old bug against this, but I can't find it. Refiling.

      Attachments

        Issue Links

          Activity

            People

              valeriep Valerie Peng
              wetmore Bradford Wetmore
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: