Commit e40892b1 by Fred Smith

add ssl debugging helpers

parent 4375512e
#! /usr/bin/env bash
# functions
function ssltest {
sslshow $1 | grep -e 'Subject:'
sslshow $1 | grep -1 -e 'X509v3 Subject Alternative Name:'
CURL_RESP=$(curl -s -I https://$1/)
if [ $? -eq 0 ]; then
echo "SSL verification succeeded"
else
echo "SSL verification failed"
fi
}
function sslshow {
openssl s_client -connect $1:443 < /dev/null 2>/dev/null | openssl x509 -text -in /dev/stdin
}
#aliases
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