When we verify jks file in Devtest, giving an error as Invalid keystore format
search cancel

When we verify jks file in Devtest, giving an error as Invalid keystore format

book

Article ID: 250147

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

We received new certificates from certification team. When we apply the certificates in virtual service, getting an error as  "Invalid keystore format". Same certificate is working fine in other applications.

 

Environment

All supported DevTest releases.

Cause

N/A

Resolution

 Keytool command was used to list the certificates in that keystore and while doing so, the keystore format was found to be PKCS12 (aka p12)

The keystore was recreated in JKS format using the commands shown below:

To import private key and SSL server certificate into a pkcs12 file

openssl pkcs12 -export -in certificate_bundle.cer -inkey server.key -name alias -out yourconvertedfile.p12

 

To convert pkcs12 file into .jks file

keytool -importkeystore -deststorepass Notallowed1 -destkeystore keystore.jks -srckeystore yourconvertedfile.p12 -srcstoretype PKCS12 -deststoretype JKS