I'm creating a keystore in the pkcs12
format using command:
> openssl pkcs12 -export -in <cert> -inkey <key> -out mycert.p12 -name <name> -caname <caname>
Once created I' checking the created keystore:
> keytool -list -keystore mycert.p12
Enter keystore password:
Keystore type: JKS
Keystore provider: SUN
...
It's shows the type JKS
.
When I specify the type of the keystore explicitly the output seems correct:
> keytool -list -keystore mycert.p12 -storetype pkcs12
Enter keystore password:
Keystore type: PKCS12
Keystore provider: SunJSSE
Why does keytool
incorrectly show the type of the keystore when the storetype
is not specified? This behaviour seems incorrect for me, the command should either fail or do not show the keystore type if the tool can't figure it out.
You 've may used a older keytool version than shipped with Java 8u192.
There was a bug JDK-8193171 reportet with the same issue.
I had the same problem with my installed jdk 1.8.0_161 - after using (the current) version 8u201 the keystore-type was displayed correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With