summaryrefslogtreecommitdiffstats
path: root/bin/hostcert
diff options
context:
space:
mode:
Diffstat (limited to 'bin/hostcert')
-rwxr-xr-xbin/hostcert3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/hostcert b/bin/hostcert
new file mode 100755
index 0000000..561244c
--- /dev/null
+++ b/bin/hostcert
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+openssl s_client -connect "$1" < /dev/null 2>/dev/null | perl -nle 'print if /BEGIN CERTIFICATE/../END CERTIFICATE/' | openssl x509 -text | perl -nle 'print unless /BEGIN CERTIFICATE/../END CERTIFICATE/'