Technical Stuff

Start from basics

Pfx to Jks conversion using jetty

Pfx to Jks conversion using jetty
Pfx to Jks conversion using jetty
5 (100%) 2 votes

Hi EveryOne ! Today we are going to discuss regarding Pfx to Jks conversion using jetty.

So, Let's begin !!!

 

  1.  About the Third Party tool

The Third party utility used for converting .pfx to .jks is JETTY 6.1.1. This API’s of the open source software are available for Free.

 

To download the utility please visit the following link:

https://jar-download.com/artifacts/org.mortbay.jetty/jetty/6.1.1/source-codehttps://jar-download.com/download-handling.php

 

2.  Usage Steps for creating jks file

Before we begin, make sure you have the Java runtime installed.

 

2.1  Step 1 :

        Login to your PC where you want to create jks file.

 

2.2  Step 2 :

         Create a folder CertConverter in E:\  

 

2.3  Step 3 :

         Copy the jetty-6.1.1.jar to the newly created folder E:\CertConverter

 

2.4  Step 4 :

         Go to Chrome Browser and click on Setting

          Setting→Advanced→Manage Certificates→Import                         

1

2.5  Step 5 :

        Click on→Next      

2

2.6  Step 6 :

         Click on browse button and specify path for your .pfx file.

3

2.7  Step 7 :

        Enter password for your .pfx file and click on next button.

4

2.8  Step 8 :

        Select  option Automatically select the certificate store based on the 

        type of Certificate and then click on next button.

 

5

2.9  Step 9 :

         Click on Finish then click ok button on prompt box.

6

2.10  Step 10 :

           Export the certificate and remove private key.

7

2.11 Step 11 :

        Click on Next Button 

8

2.12 Step 12 :

           Select do not export the private key option.

9

2.13 Step 13 :

          Select PKCS format for saving the certificate and click on next button.

10

2.14 Step 14 :

         Give the name for your new pfx file and click on next button.

11

2.15 Step 15 :

          Click on Finish button.Now your pfx file without private key is 

           Successully created.

 

2.16 Step 16 :

         Open command prompt and go to the bin folder of java (JAVA/bin). 

 

2.17 Step 17 :

          Run below command to convert .pfx to .jks 

 

          java -classpath E:\CertConverter\jetty-6.1.1.jar org.mortbay.jetty.

         security.PKCS12Import E:\CertConverter\SIBL0000000.pfx (your .pfx

         File path) E:\CertConverter\SIBL0000000.jks (new jks file name)

 

         Enter input keystore passphrase:

             password for the certificate in the .pfx file needs to be provided here

        Enter output keystore passphrase:

             password for the new .jks file certificate needs to be provided here

 

2.18 Step 18 :

         Run the below command to verify the newly created JKS keystore

          keytool -list -keystore E:\CertConverter\SIBL0000000.jks -v

 

        Enter keystore password:

             password for the new .jks file certificate needs to be provided here.

             Which you have set in  Enter output keystore passphrase in

             previous command.

 

           The output displays the content from the keystore like:-

           Keystore type:

           Keystore provider:

           No.of certificates:

           Alias name:

          Creation date:

          Entry type:

         Certificate chain length:

          .

          .

          .

          .

 

2.19 Step 19 :

          Copy the Alias Name from the output of the above command.

           If you need to change the alias name of the newly created .jks file.

 

 2.20 Step 20 :

            Run the below command to change the Alias name to specific alias 

             Which you need

             keytool -changealias -keystore E:\CertConverter\SIBL0000000.jks -v 

            -alias le-ba3a1b5a-cbe4-432b-9138-6dc2eea2e3b4(alias name which 

             You have copied from previous output)  -destalias ******(specific alias 

              Which you want to give)

 

2.21 Step 21 :

          Run the below command to verify the newly changed Alias name in the JKS

          keystore.

          keytool -changealias -keystore E:\CertConverter\SIBL0000000.jks -v 

 

2.22 Step 22 :

          The JKS is now ready for use.

 

Do let me know ,how you find the blog.Was it helpful to you?So, if you like the blog.Do subscribe to get notified…!!!

Thank you!

Happy Learning !!!
If you have doubt or queries, you can definetely comment us or can mail us on [email protected]

If you have any Recommendation for future blog, You can email us on [email protected]

Top Searches:

  1. Top Linux Commands
  2. Introduction to linux.
  3. Websphere hack
  4. My Story – Jboss Hardening
  5. Installation and configuration of Apache 2.2 on Linux
  6. DB Auto Re-connect.
  7. Redirection in Jboss.
  8. SSL Implementation in Jboss
  9. Best SSL Guide.
  10. Types of SSL.
  11. Best Jboss Server Security Guide.
  12. Introduction to hardening in Middleware.
  13. Hardening In Jboss EAP 5.1
  14. Enable TLS1.2 in Jboss EAP 7

Leave a Reply

%d bloggers like this: