Add tlscheck function to bashrc
This commit is contained in:
parent
3da6331b64
commit
e2a8a9f606
1 changed files with 9 additions and 0 deletions
|
@ -246,6 +246,15 @@ simpletls () {
|
|||
fi
|
||||
}
|
||||
|
||||
tlscheck () {
|
||||
if [ "x$1" == "x" ]
|
||||
then
|
||||
echo "Usage: tlscheck hostname:port" >&2
|
||||
else
|
||||
echo | openssl s_client -connect $1 | openssl x509 -text
|
||||
fi
|
||||
}
|
||||
|
||||
case "$-" in
|
||||
*i*)
|
||||
# Shell is interactive
|
||||
|
|
Loading…
Reference in a new issue