Extracting Private Key and Certificate from Oracle Wallet
Handling oracle wallet is quite easy and well documented on Oracle support. In recent times I have received multiple requirements when we need to export certificates and keys and deploy it into other application. I tried to collect some the steps which I have followed to do the same.
Steps need to be followed –
First we need to extract the certificates:
openssl pkcs12 -in ewallet.p12 -out certificate.pem -nokeys
We need to extract the private key then :
openssl pkcs12 -in ewallet.p12 -out priv.pem -nocerts
Now if we have a certificate and need to create a new certificate file (pkcs12 format) using the extracted server certificate and key file then following command can help us :
openssl pkcs12 -export -in serv.pem -inkey priv.pem -out cert.p12
Making this auto-login wallet
orapki wallet create wallet path_to_keystore/folder_where_certs -auto_login
That was quick and easy. Keep Learning.