Created
February 14, 2017 08:43
-
-
Save 4lun/da5e8602a55c3ab257202923c812dae6 to your computer and use it in GitHub Desktop.
Generate a self signed wildcard SSL cert (run one line at a time)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on: http://blog.celogeek.com/201209/209/how-to-create-a-self-signed-wildcard-certificate/ | |
# Replace .domain.com with desired domain (and x.domain instances) | |
openssl genrsa 2048 > x.domain.key | |
openssl req -new -x509 -nodes -sha1 -days 3650 -key x.domain.key > x.domain.cert | |
# Interactive prompt: enter *.domain.com for the Common Name | |
openssl x509 -noout -fingerprint -text < x.domain.cert > x.domain.info | |
cat x.domain.cert x.domain.key > x.domain.pem | |
chmod 400 x.domain.key x.domain.pem | |
# Optional, get public key | |
# e.g. useful for backend instance verification on AWS ELB | |
openssl rsa -in x.domain.pem -pubout > x.domain.pub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment