diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-04-08 08:46:53 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-04-08 08:46:53 -0300 |
commit | 904eed45dbfc16ef4501b33d3860cc281a545548 (patch) | |
tree | 9d25177605a3802f872023f376d25841308b860e | |
parent | 26333e7490c485505c7892d7a1fb00cf1c45fbb9 (diff) | |
download | ssl-wrapper-904eed45dbfc16ef4501b33d3860cc281a545548.tar.gz ssl-wrapper-904eed45dbfc16ef4501b33d3860cc281a545548.tar.bz2 |
SSL: options support for retrieve action
-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' } |