changes 4

This commit is contained in:
Andrea Mistrali 2021-11-23 17:41:08 +01:00
parent cecec1b6f2
commit 2c390530be
No known key found for this signature in database
GPG Key ID: 6FB0A77F6D5DA9B2
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
usage() { usage() {
echo "x509 <certfile>" echo "x509 <certfile>"
echo "x509 -r <hostname:port>" echo "x509 -r <hostname:port>"
return 0
} }
[ $# -eq 0 ] && usage [ $# -eq 0 ] && usage
@ -18,6 +19,6 @@ while getopts ":hr:" arg; do
;; ;;
esac esac
done done
[ $help -eq 1 ] && usage && return 0 [ $help -eq 1 ] && usage
[ $remote -eq 0 ] && openssl x509 -in $* -noout -text [ $remote -eq 0 ] && openssl x509 -in $* -noout -text
[ $remote -eq 1 ] && openssl s_client -connect $host < /dev/null | openssl x509 -noout -text [ $remote -eq 1 ] && openssl s_client -connect $host < /dev/null | openssl x509 -noout -text