From d4757facde2880fbe3122a41f37328ae020fc72d Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 5 Jan 2023 13:48:29 +0100 Subject: [PATCH] added openssl_remote_cert_check --- bash/check_cert_of_remote_host.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bash/check_cert_of_remote_host.sh 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