Skip to content

Instantly share code, notes, and snippets.

@fire
Last active August 29, 2015 14:04
Show Gist options
  • Save fire/6956dc2da86e2ada972c to your computer and use it in GitHub Desktop.
Save fire/6956dc2da86e2ada972c to your computer and use it in GitHub Desktop.
#Must do these as root.
openssl genrsa -out example.com.key 4096
#you will be prompted to enter password
openssl rsa -in example.com.key -out example.com.key.nopass
#you will be prompted to enter password you created in last step
openssl req -new -key example.com.key.nopass -out example.com.csr
#you will be prompted to enter country code (US), State name, City name, Organization name etc. The most important one is "Common Name", it must be the same as your domain name. For those optional item (ones marked as []", just press enter. Don't enter "A challenge password"
cat example_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt > example_com.crt
# Remove permissions from secrets
chmod 600 *.crt *.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment