Skip to content

Instantly share code, notes, and snippets.

@luissquall
Last active September 5, 2016 20:48
Show Gist options
  • Save luissquall/c8f9f50a8f1bc124ea4850e1e5e510ef to your computer and use it in GitHub Desktop.
Save luissquall/c8f9f50a8f1bc124ea4850e1e5e510ef to your computer and use it in GitHub Desktop.
# http://spin.atomicobject.com/2014/05/12/openssl-commands/
[ req ]
prompt = no
default_bits = 2048
default_md = sha256
encrypt_key = no
string_mask = utf8only
distinguished_name = req_distinguished_name
# Section x509_ext is used when generating a self-signed certificate. I.e., openssl req -x509
x509_extensions = x509_ext
[ req_distinguished_name ]
C=MX
ST=Yucatan
L=Merida
O=Monkey Digits SCP
CN={{ cert_cn }}
emailAddress=domains@affenbits.com
# http://wiki.cacert.org/FAQ/subjectAltName
# http://stackoverflow.com/questions/10175812/how-to-create-a-self-signed-certificate-with-openssl/27931596#27931596
[ x509_ext ]
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = {{ cert_cn }}
DNS.2 = www.{{ cert_cn }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment