Create self-signed certificate
#!/usr/bin/env bash | |
openssl req -newkey rsa:2048 -days 3650 -x509 -nodes -keyout server.key -new -out server.crt -config ./openssl-cert.cnf -sha256 |
[req] | |
default_bits = 2048 | |
prompt = no | |
default_md = sha256 | |
x509_extensions = v3_req | |
distinguished_name = dn | |
[dn] | |
C = BE | |
ST = Antwerp | |
L = Antwerp | |
O = IT | |
OU = IT Department | |
emailAddress = it@example.com | |
CN = localhost | |
[v3_req] | |
subjectAltName = @alt_names | |
[alt_names] | |
DNS.1 = *.localhost | |
DNS.2 = localhost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment