From 904eed45dbfc16ef4501b33d3860cc281a545548 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 8 Apr 2017 08:46:53 -0300 Subject: SSL: options support for retrieve action --- ssl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ssl b/ssl index afd1a48..ea5bfef 100755 --- a/ssl +++ b/ssl @@ -15,14 +15,18 @@ function usage { } # -# usage: retrieve-cert.sh remote.host.name [port] +# usage: ssl retrieve remote.host.name [port] +# ssl retrieve remote.host.name [port] -starttls smtp # function retrieve { REMHOST=$1 REMPORT=${2:-443} + shift 2 + OPTS="$*" + echo |\ - openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |\ + openssl s_client -connect ${REMHOST}:${REMPORT} $OPTS 2>&1 |\ sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' } -- cgit v1.2.3