How to convert .PFX certificate file to .CRT file

Hi Folks,

We had received signed certificate in .PFX format good to install this on windows machine. To import this certificate in to my application and subsequently regenerate jar files i need .crt format.

Can anyone guide me to convert .PFX certificate to .CRT format.


Hi rparthas,

The fast route (only use the public files to convert, never upload you private-key to anyone):

Or a version with command-line tools:

Hope this helps.


You may also want to check the Code Signing knowledge base.


I tried the command :

openssl pkcs12 -in Code-Sign.pfx -clcerts -nokeys -out adkeystore.crt

Later ran the import command as :

hostname-username$ adjkey -import -file adkeystore.crt -trustcacerts

                 Copyright (c) 2002 Oracle Corporation
                    Redwood Shores, California, USA

                         AD Java Key Generation

                             Version 11.5.0

NOTE: You may not use this utility for custom development
unless you have written permission from Oracle Corporation.

Reading product information from file…

Reading language and territory information from file…

Reading language information from applUS.txt …

Enter the APPS username: apps

Enter the APPS password:

Successfully created javaVersionFile.
Enter keystore password: keytool error: invalid DER-encoded certificate data

adjkey error:

java -import -file adkeystore.crt -trustcacerts -keystore /dbt_u12/home/applmgr/dbtstappl/admin/adkeystore.dat -alias DBTST_sjdfe3

The above Java program failed with error code 1.