File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,7 +145,11 @@ ssl_create() {
145145 local CA_FQDN_CRT_FILE=" ${OPTIONS["OUTPUT_DIR"]} /${OPTIONS["FQDN"]} .ca.crt"
146146 echo " # Generate CA private key and CRT files: ${CA_FQDN_CRT_FILE} "
147147 # Use the same private key and options
148- openssl req -new -x509 -sha256 -days " ${OPTIONS["EXPIRE_DAYS"]} " -key " ${FQDN_PRIVATE_KEY} " -out " ${CA_FQDN_CRT_FILE} " -subj " ${OPTIONS["SUBJECT"]} "
148+ if [[ -z " ${OPTIONS["SUBJECT"]} " ]]; then
149+ openssl req -new -x509 -sha256 -days " ${OPTIONS["EXPIRE_DAYS"]} " -key " ${FQDN_PRIVATE_KEY} " -out " ${CA_FQDN_CRT_FILE} "
150+ else
151+ openssl req -new -x509 -sha256 -days " ${OPTIONS["EXPIRE_DAYS"]} " -key " ${FQDN_PRIVATE_KEY} " -out " ${CA_FQDN_CRT_FILE} " -subj " ${OPTIONS["SUBJECT"]} "
152+ fi
149153
150154 # Server certificate
151155 # SAN: Subject Alternative Name
You can’t perform that action at this time.
0 commit comments