Verify host insecurely (they may have self signed certs)
This commit is contained in:
parent
2887346ee1
commit
f71d76bc39
|
@ -29,7 +29,8 @@ function validate_host
|
||||||
echo "$1" | grep -P '^(http|https):\/\/(([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])(:[0-9]+)?$' > /dev/null 2>&1
|
echo "$1" | grep -P '^(http|https):\/\/(([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])(:[0-9]+)?$' > /dev/null 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
debug "Checking host is resolvable: $1"
|
debug "Checking host is resolvable: $1"
|
||||||
curl $1 > /dev/null 2>&1
|
# The remote servers may sometimes have self-signed certs
|
||||||
|
curl --insecure $1 > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue