Gracefuly handle IP when both renewing cert and keeping SAN from the old cert

Signed-off-by: Xavier Bachelot <xavier@bachelot.org>
This commit is contained in:
Xavier Bachelot 2019-06-07 11:26:35 +02:00
parent 8374fcb4da
commit a41ce243c3
No known key found for this signature in database
GPG Key ID: BB12D3F6DB423490

View File

@ -1081,7 +1081,7 @@ Renewal not allowed."
{
san=$(
easyrsa_openssl x509 -in "$crt_in" -noout -text |
sed -n "/X509v3 Subject Alternative Name:/{n;s/ //g;p;}"
sed -n "/X509v3 Subject Alternative Name:/{n;s/IP Address:/IP:/;s/ //g;p;}"
)
[ -n "$san" ] && export EASYRSA_EXTRA_EXTS="\
$EASYRSA_EXTRA_EXTS