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

Bad cast in KeyStoreSpi.engineLoad(LoadStoreParameter)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • security-libs
    • None
    • b08
    • generic, x86
    • generic, windows_xp

      The default implementation of KeyStoreSpi.engineLoad(LoadStoreParameter) casts the wrong object if a SimpleLoadStoreParameter with a PasswordProtection is used. This results in a ClassCastException at runtime.

      This case only occurs if the KeyStore.Builder.newInstance(String, Provider, ProtectionParameter) method is used with a KeyStore implementation that does not override the above-mentioned engineLoad() method. Since this Builder variant is intended for token based providers, and token based providers are presumed to explicitly override the engineLoad() API, the effect of this bug should be minimal.

            andreas Andreas Sterbenz
            andreas Andreas Sterbenz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: