Merge "Allow IP-based subject alt names"
This commit is contained in:
commit
d3b41b528d
4
lib/tls
4
lib/tls
@ -249,9 +249,13 @@ function make_cert {
|
|||||||
|
|
||||||
if [ "$common_name" != "$SERVICE_HOST" ]; then
|
if [ "$common_name" != "$SERVICE_HOST" ]; then
|
||||||
if is_ipv4_address "$SERVICE_HOST" ; then
|
if is_ipv4_address "$SERVICE_HOST" ; then
|
||||||
|
if [[ -z "$alt_names" ]]; then
|
||||||
|
alt_names="IP:$SERVICE_HOST"
|
||||||
|
else
|
||||||
alt_names="$alt_names,IP:$SERVICE_HOST"
|
alt_names="$alt_names,IP:$SERVICE_HOST"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Only generate the certificate if it doesn't exist yet on the disk
|
# Only generate the certificate if it doesn't exist yet on the disk
|
||||||
if [ ! -r "$ca_dir/$cert_name.crt" ]; then
|
if [ ! -r "$ca_dir/$cert_name.crt" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user