I'm trying to convert a PKCS12 format file to a JKS keystore using the command:
keytool -v -importkeystore -trustcacerts -srckeystore cert.p12 -srcstoretype PKCS12 -destkeystore md_keystore.jks -deststoretype JKS
This returns the following message:
0 entries successfully imported, 0 entries failed or cancelled
I've taken a look at the cert.p12 file using openSSL and it appears to be fine - it contains the full certificate chain and the private key. There is no stacktrace being returned either and the resulting keystore file is also empty.
Anyone have any ideas why keystore would fail to import a seemingly valid certificate, and yet not produce any stacktraces etc?
keytool -list
to see whether keytool can see the content of your PKCS#12 file perhaps. – Ear