Last active
August 9, 2023 20:34
-
-
Save darconeous/92f12a9f14db30a5986d675fce63efba to your computer and use it in GitHub Desktop.
OpenSSL self-signed certificate config
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
# Use like: | |
# | |
# ``` | |
# openssl req -x509 -nodes \ | |
# -days 3650 \ | |
# -newkey rsa:2048 \ | |
# -keyout /etc/ssl/private/host.key.pem \ | |
# -out /etc/ssl/certs/host.crt.pem \ | |
# -config self-signed-cert.cfg | |
# ``` | |
[ req ] | |
x509_extensions = v3_ca | |
prompt = no | |
distinguished_name = req_distinguished_name | |
[ req_distinguished_name ] | |
commonName = Example Reverse Proxy | |
[ alternate_names ] | |
DNS.1 = example.com | |
DNS.2 = *.example.com | |
[ v3_ca ] | |
nsCertType = server | |
subjectKeyIdentifier=hash | |
authorityKeyIdentifier=keyid:always,issuer:always | |
basicConstraints = CA:false | |
keyUsage = critical, digitalSignature, keyAgreement | |
extendedKeyUsage = serverAuth | |
nsComment = "OpenSSL Generated Server Certificate" | |
subjectAltName = @alternate_names |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment