I am trying to generate keystore using keytool and getting below error -
D:\Java\bin>keytool -importkeystore -srckeystore cert1.p12 -srcstoretype pkcs12 -destkeystore cert1.keystore -deststoretype JKS
Enter destination keystore password:
Re-enter new password:
Enter source keystore password:
keytool error: java.io.IOException: parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)
openssl pkcs12 -export ...
then add-legacy
as Klaws said; if you are creating with something else it depends what that something is and maybe how you use it e.g. options or environment. If you can't change the creation, you can re-create it (read the unusable version and write back a usable version) (perhaps on a different system if necessary) with OpenSSL or (reasonably recent) Windows, or maybe other things. – Vahe