Created Certificate and private key using keytool command line utility ( Using Java 11 ). And then imported certificate's in PKCS#12 type trustStore.
When we try to load created PKCS#12 certificate in keystore inside program ( which run's on java 11.0.3 ), it is giving following Error:
java.io.IOException: keystore password was incorrect
But when we ran same program on Java 12.0.1, and try to load same PKCS#12 certificate, it is not giving any error's and it works fine as expected.
My Code Snippet:
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
Similar Reported Bug's:
Does PKCS#12 certificate's created with Java 11 does not supported in keystore ?
This bug is fixed in Java 12 but still not back ported in Java 11 (11.0.4) till now ?