summaryrefslogtreecommitdiff
path: root/openssl-connect
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-12-06 00:06:35 +0100
committerPeter Wu <lekensteyn@gmail.com>2013-12-06 00:06:35 +0100
commit403cfce4177cab791e29209f63f665d7170c20e3 (patch)
tree3662e069015d8776343c4913e3916d2ba577a27f /openssl-connect
parentbefe0f77dd2246e437e61cefb861bf9a6d4ff82b (diff)
downloadwireshark-notes-403cfce4177cab791e29209f63f665d7170c20e3.tar.gz
openssl-{connect,listen}: fix usage, reduce output
The CLIENT_RANDOM is applicable to clients only, so remove it from ServerHello. Also update notes with cmake+gcrypt instructions.
Diffstat (limited to 'openssl-connect')
-rwxr-xr-xopenssl-connect8
1 files changed, 5 insertions, 3 deletions
diff --git a/openssl-connect b/openssl-connect
index 4a977f7..23ebc47 100755
--- a/openssl-connect
+++ b/openssl-connect
@@ -2,16 +2,18 @@
# Connects to a SSL host for a list of ciphers
# Author: Peter Wu <lekensteyn@gmail.com>
+# Usage: $0 [host [portbase]] [openssl options]
+# Defaults for host and portbase are shown below:
host=localhost
portbase=4430
PSK=12345678
PSK=0102030405060708091011121314151617181920
# assume that openssl options always start with -
-if [[ $1 != -* ]]; then
+if [ -n "$1" ] && [[ $1 != -* ]]; then
host=$1; shift
fi
-if [[ $1 != -* ]]; then
+if [ -n "$1" ] && [[ $1 != -* ]]; then
portbase=$1; shift
if ! [[ $portbase -gt 0 ]] || ! [[ $portbase -le 65535 ]]; then
echo "Port must be between 1 and 65535" >&2
@@ -44,7 +46,7 @@ s_client_client_random() {
}
# Match TLS 1.2 Random bytes (over three lines)
- / ClientHello|ServerHello$/{version=3;l=3;s=""}
+ / ClientHello/{version=3;l=3;s=""}
# Match SSLv2 Challenge
/ CLIENT-HELLO$/{version=2;l=4;s=""}