Skip to content

Instantly share code, notes, and snippets.

@hoanghiep90
Created May 30, 2015 08:21
Show Gist options
  • Save hoanghiep90/5e38cc739c72a6d5b16e to your computer and use it in GitHub Desktop.
Save hoanghiep90/5e38cc739c72a6d5b16e to your computer and use it in GitHub Desktop.
Create a SSL Certificate
Step 1: Creating the private server key.
sudo openssl genrsa -des3 -out server.key 2048
Step 2: Creating a certificate signing request:
sudo openssl req -new -key server.key -out server.csr
This command will prompt terminal to display a lists of fields that need to be filled in.
Step 3: Remove the Passphrase:
sudo cp server.key server.key.org
sudo openssl rsa -in server.key.org -out server.key
Step 4: Sign your SSL Certificate
sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment