Created
July 14, 2017 01:42
-
-
Save sturadnidge/c6351940d84896107608e41f5417f20a to your computer and use it in GitHub Desktop.
Config file to generate a certificate signing request for 12factor.com for use with PCF (ie all required SANs)
This file contains hidden or 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 = 2048 | |
default_md = sha256 | |
distinguished_name = subject | |
encrypt_key = no | |
prompt = no | |
req_extensions = req_ext | |
[subject] | |
countryName = AU | |
stateOrProvinceName = NSW | |
localityName = Sydney | |
organizationName = 12factor | |
commonName = 12factor.com | |
emailAddress = [email protected] | |
[req_ext] | |
basicConstraints = CA:FALSE | |
keyUsage = digitalSignature, keyEncipherment | |
subjectAltName = @alt_names | |
[alt_names] | |
DNS.1 = *.12factor.com | |
DNS.1 = *.apps.12factor.com | |
DNS.3 = *.system.12factor.com | |
DNS.4 = *.login.system.12factor.com | |
DNS.5 = *.uaa.system.12factor.com |
When you get the cert back from the issuing CA (see https://gist.github.com/sturadnidge/67bc038f00db65690e8a61951f734c51 for how to set up an issuing CA), combine things to get a .pem:
cat 12factor.key 12factor.cert > 12factor.pem
If you need to extract the public key:
openssl x509 -pubkey -noout -in 12factor.pem > 12factor.pub
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generate a new private key and a request
openssl req -newkey rsa:2048 -nodes -keyout 12factor.key -config 12factor.req -out 12factor.csr
Use an existing private key and generate a request
openssl req -new -config 12factor.req -key 12factor.key -out 12factor.csr