Wednesday, January 25, 2012

Creating a .pem file from GoDaddy SSL cert.

If using an SSL accelerator like Pound, you need to create a .pem file with your private key, the .crt file from GoDaddy, and their intermediate cert file.

Let's say you have a domain name of foo.com. You'll first need to generate the the .csr file for GoDaddy with the following command:


openssl req -new -newkey rsa:2048 -nodes -keyout foo.com.key -out foo.com.csr

This gives you 2 files:
foo.com.key - This is the private key
foo.com.csr - This is the Certificate Signing Request

You'll give the foo.com.csr file to the SSL signing authority. In the case of GoDaddy, they'll give you back a .zip file with the following 2 files:

foo.com.crt - This is your cert
gd_bundle.crt - This is the GoDaddy Certificate Chain

With all these files, you need to generate the .pem file. This is actually pretty easy. Assuming that you created the private key (foo.com.key) without a password, you can just do the following in order to create your .pem file:


cat foo.com.crt foo.com.key gd_bundle.crt > foo.com.pem

7 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Is it possible to do this without SSH access?

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. I suppose you could generate it on your local machine, if you have access to openssl on there. However, you'll still need to get it onto your web server.

    ReplyDelete
    Replies
    1. I was able to do it remotely from another server since GoDaddy refuses to acknowledge that I have issues connecting to my hosting via SSH. Thanks for the speedy response though!

      Delete
    2. I was able to do it remotely from another server since GoDaddy refuses to acknowledge that I have issues connecting to my hosting via SSH. Thanks for the speedy response though!

      Delete
  5. This comment has been removed by a blog administrator.

    ReplyDelete