Pages

Thursday, December 19, 2013

import pfx certificate using keytool

import pfx certificate using keytool

Recently I was working with Certificates.My requirement, is I have a PFX Certificate and I want to convert into Java Key Store and Use that for SSL Communication.


This link was helpful in achieving the requirement

http://stackoverflow.com/questions/4217107/how-to-convert-pfx-file-to-keystore-with-private-key 

Run this command

keytool -importkeystore -srckeystore <mypfxfile.pfx> -srcstoretype pkcs12 
-destkeystore clientcert.jks -deststoretype JKS
 

Now this will prompt to enter a password. Give the password related to the PFX file.

Now the PFX will be converted and stored in $HOME/.keystore.
For example, If you work in Linux and logged in as root user, keystore will be located under

/root/.keystore

where $HOME corresponds to the Home directory of a User.
 
 

No comments:

Post a Comment