How do I create SSL certificates with OpenSSL on the command line?

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Mon, 2006-08-07 16:06. :: Apache

You do it like this:

openssl genrsa -des3 -passout pass:yourpassword -out /path/to/your/key_file 1024

openssl req -new -passin pass:yourpassword -passout pass:yourpassword -key /path/to/your/key_file -out /path/to/your/csr_file -days 365

openssl req -x509 -passin pass:yourpassword -passout pass:yourpassword -key /path/to/your/key_file -in /path/to/your/csr_file -out /path/to/your/crt_file -days 365

openssl rsa -passin pass:yourpassword -in /path/to/your/key_file -out /path/to/your/key_file2

chmod 400 /path/to/your/key_file2


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.