Creating a self-signed SSL certificate

From Notes to self
Revision as of 19:42, 13 June 2015 by Verbovet (talk | contribs)
Jump to navigation Jump to search
  • Without making a CA (Certificate Authority)
    • $ openssl req -new -x509 -sha256 -days 10000 -nodes -out server.crt -keyout server.key
    • Set the Common Name (CN) to the FQDN and enter "." for everything else.
  • Creating a CA and sign a server certificate with it
    • openssl genrsa -out myCA.key 2048
    • openssl req -new -x509 -sha256 -days 10000 -nodes -key myCA.key -out myCA.crt
  • Put files server.crt and server.key to /etc/httpd/ (on Slackware) and set their permissions to 400.