Skip to content

Instantly share code, notes, and snippets.

@hpherzog
Created February 16, 2018 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hpherzog/2ee68d7105d36d1ae1f52a89ae3195ba to your computer and use it in GitHub Desktop.
Save hpherzog/2ee68d7105d36d1ae1f52a89ae3195ba to your computer and use it in GitHub Desktop.
Create self signed ssl certificate including subjectAltName
openssl req -x509 -nodes -days 730 -newkey rsa:2048 -keyout key.pem -out cert.pem -config openssl.conf -extensions 'v3_req'
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
C = DE
ST = Bundesland
L = Stadt
O = Firma
OU = Abteilung
CN = foo1
[v3_req]
keyUsage = keyEncipherment, dataEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
[alt_names]
DNS.1 = foo1
DNS.2 = foo2
DNS.3 = localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment