Skip to content

How To: Convert SSL Certificates to Different Formats (.crt, .pfx, .ca-bundle)

by Jon on February 10th, 2011

Sometimes when getting an SSL cert back from a certificate authority it is not in the correct format for your application for example a load balancer, Windows IIS, or Apache to name a few. There are a couple of ways to handle this, I prefer to do it through the use of openssl on my linux box, to do that use the following command format.

Convert From PEM (.crt file) to .pfx

openssl pkcs12 -export -out doman_com.pfx -inkey doman_com.key -in doman_com.crt -certfile doman_com.ca-bundle
.pfx = this is the output file
.key = this is the original key file used to create the csr
.crt = this is the file received back from the certificate authority
.ca-bundle = this is the cert from the certificate authority we are converting to pfx

From → Linux

2 Comments
  1. Thanks! Great article. ;0)

  2. anton permalink

    Hy there! I want to convert a .cer into .p12. Can u explain exactly how can i do this. thanx a lot!

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS

%d bloggers like this: