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.