summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2015-08-21 14:45:27 +0200
committerLeif Johansson <leifj@sunet.se>2015-08-21 14:45:27 +0200
commit63e3ebb09ceef992671129978846552e62df12e6 (patch)
treee66f86c8c8e6f41fd3aa50382c3198927fa82556 /scripts
parentdeee49e7b5e8b6e773a2a200c2bca4729f6970a2 (diff)
a couple of tools...
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cert-retrieve.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/cert-retrieve.sh b/scripts/cert-retrieve.sh
new file mode 100755
index 00000000..5440b0f8
--- /dev/null
+++ b/scripts/cert-retrieve.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# usage: retrieve-cert.sh remote.host.name [port]
+#
+REMHOST=$1
+REMPORT=${2:-443}
+
+echo | openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'