diff options
-rwxr-xr-x | ssl | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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' } |