diff --git a/bash/check_cert_of_remote_host.sh b/bash/check_cert_of_remote_host.sh new file mode 100755 index 0000000..218d84f --- /dev/null +++ b/bash/check_cert_of_remote_host.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# check cert (and not only a successfully connect) of a remote server with openssl: +CHECK_HOST="google.com:443"; echo -n | openssl s_client -connect $CHECK_HOST | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | openssl x509 -text