Dave's Brain

Browse - Computer Tips - How can I generate .key and .csr files for an SSL certificate?

Date: 2012nov28
OS: Linux

Q.  How can I generate .key and .csr files for an SSL certificate?

A.

The .key file is your secret key
The .csr files is your Certificate Signing Request

Generate the key:

openssl genrsa -out SERVER.key 2048
Remove the password:
openssl rsa -in SERVER.key -out SERVER.nopass.key
Make the CSR:
openssl req -new -key SERVER.nopass.key -out SERVER.csr
Where SERVER is your host name - example.com Now send the .csr to your certificate issuer. You'll get a .crt file back. Convert it into a .pem http://www.davekb.com/search.php?target=pem+file When your .crt expires you do NOT have to redo these steps. Just resend the .csr

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.