fixes
This commit is contained in:
parent
f15fd526cd
commit
9229ff93e5
@ -170,18 +170,15 @@ keyUsage = critical, digitalSignature, keyEncipherment, keyCertSign
|
|||||||
[ v3_req_server ]
|
[ v3_req_server ]
|
||||||
basicConstraints = CA:FALSE
|
basicConstraints = CA:FALSE
|
||||||
keyUsage = critical, digitalSignature, keyEncipherment
|
keyUsage = critical, digitalSignature, keyEncipherment
|
||||||
extendedKeyUsage = serverAuth
|
extendedKeyUsage = serverAuth"
|
||||||
subjectAltName = @alt_names
|
|
||||||
[ alt_names ]"
|
|
||||||
|
|
||||||
|
if [ -z $ARG_NOSAN ]; then
|
||||||
if [ $ARG_NOSAN -ne 1 ]; then
|
|
||||||
# Gather IPs for SAN
|
# Gather IPs for SAN
|
||||||
|
|
||||||
i=1
|
i=1
|
||||||
IPS="$(getent ahostsv4 $(hostname) | awk '{print $1}' |sort | uniq)"
|
IPS="$(getent ahostsv4 $(hostname) | awk '{print $1}' |sort | uniq)"
|
||||||
echo "[${ME}] Found these IPs: " ${IPS}
|
echo "[${ME}] Found these IPs: " ${IPS}
|
||||||
PAYLOAD="$(for IP in $IPS; do echo "IP.${i} = ${IP}" ; i=$((i + 1)); done)"
|
PAYLOAD="subjectAltName = @alt_names\n[ alt_names ]\n$(for IP in $IPS; do echo "IP.${i} = ${IP}" ; i=$((i + 1)); done)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "${OPENSSL_CONFIG_CONTENT}\n${PAYLOAD}\n" > "${OPENSSL_CONFIG}"
|
printf "${OPENSSL_CONFIG_CONTENT}\n${PAYLOAD}\n" > "${OPENSSL_CONFIG}"
|
||||||
|
Loading…
Reference in New Issue
Block a user