Friday, May 29, 2015

Convert Java key store certificate from ".jks" to LoadRunner ".pem" format.

This article show you step by step approach how to convert ".jks" to ".pem". Two different tools will be used for the process and there are two steps... 
Keytool – It a Java key and certificate management utility. It allows users to manage their own public/private key pairs and certificates. It comes with Java/JRE/JDK and almost all computer has JRE.
OpenSSL - It comes with LoadRunner. If not can be downloaded from internet ( 

First, convert JKS to PKCS12 format:

  • Save the ".jks" file in your computer. My ".jks" file name is "demo.jks" and saved in "C:\temp".
  • Open the command prompt ("Start >> All Programs >> Accessories >> Command Prompt" or "Start >> Run and type 'cmd' and hit enter")
  • Navigate to Java or JRE bin folder on the command prompt. On the command prompt type "Java\jre1.x.x_xx\bin". It could be different on your computer.
  • On the command prompt, type following and it will create another file with “.p12” extension. Make sure to replace file and folder path.
keytool -importkeystore -srckeystore "C:\Temp\demo.jks" -srcalias cpwxc_test -destkeystore "C:\Temp\demo.p12" -deststoretype PKCS12
  • It prompts you to enter password, enter the password. Remember this password, you will need it on the next step.

Next, convert PKCS12 to PEM format:

On the command prompt, go to the OpenSSL location and type following text and it will create a file with “.pem” extention.
openssl pkcs12 -in "C:\Temp\demo.p12" -out "C:\Temp\demo.pem"
It will ask you to enter password. Enter the password you entered in the previous step.

>>> Let me know what you think in the comment. Any constructive feedback will be appreciated & will helpful to others…


Cindy Dy said...

You are an awesome blogger. This is one of the best blog I had visited so far. Hope to read more post from you in the future. Keep it up. God bless.


mathew delport said...

Excellent article on load testing!!! This testing exhibits the ability of a software application/system to withstand actual load. Loadrunner training in Chennai

Goodtech Consulting said...

Nice Post.. Performance Testing Services

joy said...

If you fail it doesn't mean you are weak, you fail because there are things that are not meant for you or not meant to happen. Accept failures and take it as a challenge to become a better person. Visit my site for more information. Thank you and have a nice day.

Chandrika Madapudi said...

The future of automation testing tool is on the positive tool. As the demand of quality web application keeps on increasing, the tool like Selenium IDE is getting very popular all over the world. Thus, taking Selenium Training in Chennai will help you to enter software testing industry. Best Selenium training institute in Chennai

Mathew Stephen said...

Hi, I wish to be a regular contributor of your blog. I have read your blog. Your information is really useful for beginner. I did Selenium Training in Chennai at Fita training and placement academy which offer best Selenium Training with years of experienced professionals. This is really useful for me to make a bright career.
Selenium training in Chennai | selenium testing training in Chennai

Paul Miller said...

Excellent post, now a day’s huge demand for the certified java professionals in IT industry. Java gives more career opportunity for the fresher’s as well as experienced experts.
JAVA Training in Chennai|JAVA Course in Chennai

Shilpi Singh said...

keytool -importkeystore -srckeystore "C:\Temp\demo.jks" -srcalias cpwxc_test -destkeystore "C:\Temp\demo.p12" -deststoretype PKCS12

In the above command what is "-srcalias cpwxc_test". I am getting error that its doesn't exist.

Rohan Singh said...

This is one of the best blog I had visited so far hope post more.
Thanks for the sharing.
Web Designing training in noida | SAS Summer Training in Noida

Melisa said...

Excellent article!!! LoadRunner is popular automation testing tool used for validating a software application/system under load. It delivers most precise information about the performance, functionality and behavior of the software product. Loadrunner Training in Chennai | Qtp training in Chennai

Nandhini said...

Interesting post! This is really helpful for me. I like it! Thanks for sharing!
Mobile application developers in Chennai | PHP developers Chennai

anisha singh said...

Thanks for Sharing this Valuable Information about Java
Java Training in Noida