Create CSR (Certificate Sign Request)
Create CSR config file
export fqdn="project.customer.com"
vi ${fqdn}.csr.conf
content
[ req ]
default_bits = 2048
default_md = sha256
prompt = no
encrypt_key = no
distinguished_name = dn
req_extensions = req_ext
[ dn ]
C = country-abbreviation
ST = project
L = location
O = org
OU = org-unit
CN = project.customer.com
[ req_ext ]
subjectAltName = @alt_names
[ alt_names ]
DNS.1 = www.project.customer.com
DNS.2 = stg-project.customer.com
DNS.3 = www.stg-project.customer.com
Generate CSR
export fqdn="project.customer.com"
openssl req \
-new \
-newkey rsa:4096 \
-nodes \
-config ${fqdn}.csr.conf \
-keyout ${fqdn}.key \
-out ${fqdn}.csr
Verify CSR
openssl req \
-in ${fqdn}.csr \
-noout \
-text