mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-23 08:48:30 +02:00
rfc8738: fix CN on certs with mixed ip+dns
This commit is contained in:
@@ -1467,12 +1467,15 @@ sign_domain() {
|
|||||||
for altname in ${altnames}; do
|
for altname in ${altnames}; do
|
||||||
if [[ "${altname}" =~ ^ip: ]]; then
|
if [[ "${altname}" =~ ^ip: ]]; then
|
||||||
SAN="${SAN}IP:${altname:3}, "
|
SAN="${SAN}IP:${altname:3}, "
|
||||||
SUBJ="/CN=${domain:3}/"
|
|
||||||
else
|
else
|
||||||
SAN="${SAN}DNS:${altname}, "
|
SAN="${SAN}DNS:${altname}, "
|
||||||
SUBJ="/CN=${domain}/"
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
if [[ "${domain}" =~ ^ip: ]]; then
|
||||||
|
SUBJ="/CN=${domain:3}/"
|
||||||
|
else
|
||||||
|
SUBJ="/CN=${domain}/"
|
||||||
|
fi
|
||||||
SAN="${SAN%%, }"
|
SAN="${SAN%%, }"
|
||||||
local tmp_openssl_cnf
|
local tmp_openssl_cnf
|
||||||
tmp_openssl_cnf="$(_mktemp)"
|
tmp_openssl_cnf="$(_mktemp)"
|
||||||
|
|||||||
Reference in New Issue
Block a user