Created
July 20, 2017 19:54
-
-
Save paulreece42/8b36c33230ad02c82436c99fcc174f72 to your computer and use it in GitHub Desktop.
SAN Certificate self-signed by own CA, good (in theory, but untested) for k8s etc
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
## BEGIN san.cnf ## | |
[ req ] | |
default_bits = 2048 | |
distinguished_name = req_distinguished_name | |
req_extensions = v3_req | |
prompt = no | |
[ req_distinguished_name ] | |
commonName = foo.bar | |
[ v3_req ] | |
subjectAltName = @alt_names | |
[alt_names] | |
DNS.1 = bar.baz | |
IP.1 = 127.0.0.1 | |
## END san.cnf ## | |
openssl req -out sslcert.csr -newkey rsa:2048 -nodes -keyout private.key -config san.cnf | |
openssl x509 -in sslcert.csr -out sslcert.crt -req -signkey /path/to/my/ca.key -days 3650 -extfile san.cnf -extensions v3_req |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment