Skip to content

Commit

Permalink
Add subjectAltName to custom certificates role
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms authored and ekohl committed Mar 25, 2022
1 parent a60cd03 commit e8a3931
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions roles/custom_certificates/templates/openssl.cnf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ nameopt = default_ca
certopt = default_ca

unique_subject = no
copy_extensions = none
copy_extensions = copy

[ policy_match ]
countryName = match
Expand Down Expand Up @@ -56,11 +56,16 @@ authorityKeyIdentifier = keyid:always,issuer:always
nsCertType = sslCA
keyUsage = cRLSign, keyCertSign
extendedKeyUsage = serverAuth, clientAuth

subjectAltName = @alt_names

[ v3_req ]
basicConstraints = CA:FALSE
subjectKeyIdentifier = hash
extendedKeyUsage = serverAuth, clientAuth
subjectAltName = @alt_names

[alt_names]
DNS.1 = {{ ansible_fqdn }}

[ ssl_server ]
basicConstraints = CA:FALSE
Expand Down

0 comments on commit e8a3931

Please sign in to comment.