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

importkeystore fails to a password less pkcs12 keystore

XMLWordPrintable

    • b24
    • generic
    • generic

      Imports from any keystores like jks, jceks, bks or pkcs12 are failing.

      Steps :
      1) Create any type of keystore(jks, jceks, bks or pkcs12)
      Eg: JKS - keytool -keystore testkeystore.jks -genkeypair -keyalg EC -alias testcert -dname CN=b -storetype jks -storepass password -keypass pass123

      2) Try to import same in to a password less pkcs12 file
      keytool -importkeystore -srckeystore testkeystore.jks -destkeystore testkeystore.p12 -J-Dkeystore.pkcs12.macAlgorithm=NONE -J-Dkeystore.pkcs12.certProtectionAlgorithm=NONE

      Error message:
      Problem importing entry for alias testcert: java.security.KeyStoreException: non-null password required to create PrivateKeyEntry.
      Entry for alias testcert not imported.
      Do you want to quit the import process? [no]:

            hchao Haimay Chao
            akolarkunnu Abdul Kolarkunnu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: