Created
April 29, 2013 09:15
-
-
Save garethrees/5480560 to your computer and use it in GitHub Desktop.
Open SSL SAN
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
# Generate Private Key | |
$ openssl genrsa -out server.key 2048 | |
# Generate CSR | |
$ openssl req -new -out server.csr -key server.key -config openssl.cnf | |
# => Fill in info | |
# Check CSR | |
$ openssl req -text -noout -in server.csr | |
# Sign Cert | |
$ openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt -extensions v3_req -extfile openssl.cnf |
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
[ req ] | |
default_bits = 1024 | |
default_keyfile = privkey.pem | |
distinguished_name = req_distinguished_name | |
req_extensions = v3_req | |
[ req_distinguished_name ] | |
countryName = Country Name (2 letter code) | |
countryName_default = UK | |
stateOrProvinceName = State or Province Name (full name) | |
stateOrProvinceName_default = Wales | |
localityName = Locality Name (eg, city) | |
localityName_default = Cardiff | |
organizationName = Organization Name (eg, company) | |
organizationName_default = Example UK | |
commonName = Common Name (eg, YOUR name) | |
commonName_default = one.test.app.example.net | |
commonName_max = 64 | |
[ v3_req ] | |
basicConstraints = CA:FALSE | |
keyUsage = nonRepudiation, digitalSignature, keyEncipherment | |
subjectAltName = @alt_names | |
[alt_names] | |
DNS.1 = two.test.app.example.net | |
DNS.2 = exampleapp.com |
Default openssl.cnf
on OS X:
/System/Library/OpenSSL/openssl.cnf
:-) good template to have .
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
References