Skip to content

Instantly share code, notes, and snippets.

@jeroenheijmans
Created May 31, 2020 22:31
Show Gist options
  • Save jeroenheijmans/617aef7046aee665fddec319a55eda03 to your computer and use it in GitHub Desktop.
Save jeroenheijmans/617aef7046aee665fddec319a55eda03 to your computer and use it in GitHub Desktop.
Certificate configuration for dotnet Ubuntu 20.04 localhost https dev
# Based on https://stackoverflow.com/a/59702094/419956 by user @chrisvdb cc-by-sa rev 2020.5.28.36925
# Not currently working for me on Ubuntu 20.04 though!
[req]
default_bits = 2048
default_keyfile = localhost.key
distinguished_name = req_distinguished_name
req_extensions = req_ext
x509_extensions = v3_ca
[req_distinguished_name]
commonName = localhost
commonName_default = localhost
commonName_max = 64
[req_ext]
subjectAltName = @alt_names
[v3_ca]
subjectAltName = @alt_names
basicConstraints = critical, CA:false
keyUsage = keyCertSign, cRLSign, digitalSignature, keyEncipherment
[alt_names]
DNS.1 = localhost
DNS.2 = 127.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment