Commit 50fe937c authored by Xueshan Feng's avatar Xueshan Feng
Browse files

Added host validation.

parent 25da2a28
#!/bin/sh
fqdn=$1
port=${2:-443}
[ -x $fqdn ] && echo "FQDN of the site is required." && exit 1
echo "" | openssl s_client -servername $fqdn -connect $fqdn:443 2>/dev/null | openssl x509 -text
! host $fqdn > /dev/null && echo "$fqdn is not a vaild host." && exit 1
echo "" | openssl s_client -servername $fqdn -connect $fqdn:$port 2>/dev/null | openssl x509 -text
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment