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

keytool should remember real storetype if it is not provided

    XMLWordPrintable

Details

    Backports

      Description

        When -storetype is not provided, keytool now uses type probing to load a file-based keystore. However, the real storetype is never remembered and keytool is still using the default storetype ("pkcs12") to validate command and options, and some special pkcs12-only restrictions (For example, keypass and storepass must be same) might be incorrectly enforced on a non-pkcs12 keystore.

        For example:

        $ keytool -keystore ks -genkeypair -alias a -dname CN=a -storepass changeit -keypass changeit -storetype jks

        $ keytool -keystore ks -keypasswd
        keytool error: java.lang.UnsupportedOperationException: -keypasswd commands not supported if -storetype is PKCS12

        Attachments

          Issue Links

            Activity

              People

                weijun Weijun Wang
                weijun Weijun Wang
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: