Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Generate a self signed wildcard SSL cert (run one line at a time)
# Based on:
# Replace 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 * for the Common Name
openssl x509 -noout -fingerprint -text < x.domain.cert >
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 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment