OpenSSL HowTo
OpenSSL HowTo
Table of Contents
1. Generate a Server Key ............................................................................................................... 1
1.1. Purpose ......................................................................................................................... 1
1.2. Command ...................................................................................................................... 1
2. Generate a CSR ........................................................................................................................ 1
2.1. Purpose ......................................................................................................................... 1
2.2. Command ...................................................................................................................... 1
3. Supplying the CSR to the Certificate Authority (CA) ....................................................................... 2
3.1. Purpose ......................................................................................................................... 2
4. Installing the Certificate ............................................................................................................. 3
4.1. Purpose ......................................................................................................................... 3
4.2. Things to remember ........................................................................................................ 3
4.3. Example Installations ....................................................................................................... 3
1.2. Command
Procedure 1. Generate a new server key
• openssl genrsa -des3 -out <name of key>.key 1024
2. Generate a CSR
2.1. Purpose
This generates a CSR for use for a host. In the request, we describe all the details about the certificate.
2.2. Command
Procedure 2. Generate a new Certificate Signing Request (CSR)
• openssl req -new -key <name of key>.key -out <name of csr>.csr
1
OpenSSL
Note
The most important item in this CSR is the Common Name. For web, it must correlate to the host name
you are wishing to secure.
2
OpenSSL
• The key that you used to generate the csr will have to have it's password removed, if you are going to use the
certificate in a service, such as apache2. Remove the password as follows:
openssl rsa -in <my server FQDN>.key -out <my server FQDN>.key.nopass