• Things to remember when creating Apache SSL certs

    Since I don’t create certs all that often, I’ve always been frusterated by having to search out the commands every time I have to make one. Frequently I forget about removing tripple DES from the server.key file, and end up with a cert that makes me enter a psss phraze every time I start up Apache.

    Thus, I decided to create an entry here with all the commands, so that I will never have to go searching for them again.

    First, change directory into your Apache configuration directory:

    # cd /path/to/httpd/conf

    Generate the server key (with password):

    # openssl genrsa -des3 -out server.key 1024

    Optionally, we can generate a key file without a password. This means that Apache will start without requesting a password. This is important should there ever be a power failure, or when a reset is required and no one knows the password. Use the following command:

    # openssl rsa -in server.key -out server.pem

    A CSR (Certificate Signing Request) is required for afirming that the server key is valid. The server.pem is used in place of server.key as we don’t require a password:

    # openssl req -new -key server.pem -out server.csr

    You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter ‘.’, the field will be left blank.

    —–
    Country Name (2 letter code) [AU]:US
    State or Province Name (full name) [Some-State]:Your State
    Locality Name (eg, city) []:Your Cit
    Organization Name (eg, company) [Internet Widgits Pty Ltd]: Your Company Nam
    Organizational Unit Name (eg, section) []:Department Name
    Common Name (eg, YOUR name) []: server.spiralbound.net
    Email Address []:me@spiralbound.net
    Please enter the following ‘extra’ attributes to be sent with your certificate request
    A challenge password []:
    An optional company name []:

    Finally, the certificate needs to be signed. Normally this is done by an official authority such as Thawte. However, if this is not available, we can sign the certificate ourselves. In this example a time limit of 3 years, or 1095 days is set for the amount of time to be valid. Again, we use the server.pem file without a password.

    # openssl x509 -req -days 1095 -in server.csr -signkey server.pem -out server.crt

    This entry was posted on Thursday, April 28th, 2005 at 3:59 pm and is filed under Data and Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 0 Comments

    Take a look at some of the responses we've had to this article.

  • Leave a Reply

    Let us know what you thought.

  • Name (required):

    Email (required):

    Website:

    Message:

Visitors have tagged this post: t (352) - remove password from ssl key (35) - remove password from ssl cert (31) - ssl remove password (30) - openssl remove certificate password (30) - openssl no password (27) - remove password from ssl certificate (26) - apache ssl password (25) - apache certificate password (24) - remove ssl password (23) - spiralbound net (23) - openssl genrsa without password (22) - apache ssl "remove password" (22) - openssl remove password (21) - Create .pem (19) - generate apache.pem (19) - apache ssl no password (18) - openssl without password (18) - openssl genrsa no password (17) - genrsa no password (17) - openssl change password (16) - remove password from ssl (16) - apache ssl without password (15) - openssl remove password from certificate (15) - remove password ssl key (14) - openssl certificate remove password (14) - apache certificate remove password (14) - openssl remove certificate (13) - ssl without password (12) - openssl remove password certificate (12) - ssl certificate remove password (11) - remove password ssl (11) - openssl key "no password" (10) - openssl certificate without password (10) - apache ssl password startup (10) - remove ssl key password (10) - start apache ssl without password (9) - openssl certificate no password (9) - remove password from pem file (9) - generate apache pem (9) - +Openssl +apache +remove-password (9) - remove password ssl certificate (9) - generate csr without password (9) - apache remove password from cert (9) - apache certificate without password (8) - apache remove password certificate (8) - openssl apache pem (8) - apache ssl key "remove password" (8) - "remove password from certificate" (8) - apache certificate "no password" (8) - apache remove certificate password (8) - removing password from ssl certificate (8) - f (8) - apache.pem (8) - tag/Solaris (7) - apache ssl start password (7) - removing ssl password (7) - openssl create .pem (7) - "apache.pem" (7) - remove certificate password apache (7) - openssl remove password from cert (7) - generate ssl key without password (7) - genrsa password (7) - ssl cert remove password (7) - openssl remove password apache (7) - remove password from certificate openssl (7) - openssl delete certificate (7) - openssl remove cert password (7) - make apache.pem (7) - all (6) - apache ssl certificate "remove password" (6) - removing password ssl key (6) - remove password ssl cert (6) - removing password from ssl key (6) - remove password certificate openssl (6) - remove password from ssl key file (6) - make pem (6) - openssl key without password (6) - removing password from ssl cert (6) - start apache ssl password (6) - apache openssl remove password (6) - removing openssl certificate password (6) - remove ssl cert password (6) - SSL key remove password (6) - apache ssl cert password (6) - apache restart ssl password (6) - ssl key without password (6) - server (5) - openssl generate (5) - openssl key "change password" (5) - openssl apache.pem (5) - remove password from certificate apache (5) - remove password from cert (5) - remove password certificate apache (5) - apache ssl start without password (5) - openssl apache no password (5) - apache remove password from key (5) - remove apache SSL password (5) - openssl remove pem password (5) - openssl generate key without password (5) - "remove password" apache SSL (5) - openssl remove password from keyfile (5) - ssl key no password (5) - apache start ssl password (5) - genrsa without password (5) - openssl csr no password (5) - generate csr no password (5) - csr no password (5) - openssl pem no password (5) - openssl apache without password (4) - openssl create (4) - removing password from .pem (4) - remove password from apache certificate (4) - openssl create pem file (4) - remove password from csr (4) - ssl remove password from certificate (4) - openssl generate certificate without password (4) - start apache ssl no password (4) - openssl remove challenge password (4) - apache remove ssl password (4) - OpenSSL generate key no password (4) - openssl create key without password (4) - remove openssl certificate password (4) - no password csr (4) - openssl create apache (4) - remove password from pem (4) - remove password from apache key (4) - openssl remove password from key (4) - openssl rsa -in server.key -out server.pem (4) - apache create .pem (4) - remove password from openssl certificate (4) - openssl create without password (4) - apache cert no password (4) - ssl remove password certificate (4) - certificate password apache (4) - remove password from key apache (4) - apache ssl password on startup (4) - apache remove password from certificate (4) - remove password pem file (4) - SSL Certificate without password (4) - remove password certificate key (4) - remove password cert openssl (4) - start apache without ssl password (4) - openssl create cert without password (3) - openssl create key no password (3) - apache cert without password (3) - openssl "change password" certificate (3) - +apache +remove-password (3) - start apache with password (3) - removing password from cert (3) -