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

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

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: