summaryrefslogtreecommitdiff
path: root/regress/dhgex.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/dhgex.sh')
-rw-r--r--regress/dhgex.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/regress/dhgex.sh b/regress/dhgex.sh
index 61fc178e8..ceb3b5d23 100644
--- a/regress/dhgex.sh
+++ b/regress/dhgex.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: dhgex.sh,v 1.4 2017/05/08 01:52:49 djm Exp $ 1# $OpenBSD: dhgex.sh,v 1.5 2019/09/27 05:25:12 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="dhgex" 4tid="dhgex"
@@ -28,15 +28,19 @@ ssh_test_dhgex()
28 if [ $? -ne 0 ]; then 28 if [ $? -ne 0 ]; then
29 fail "ssh failed ($@)" 29 fail "ssh failed ($@)"
30 fi 30 fi
31 # Remove CRs.
32 sed 's/\r//' ${LOG} >${LOG}.new
33 mv ${LOG}.new ${LOG}
31 # check what we request 34 # check what we request
32 grep "SSH2_MSG_KEX_DH_GEX_REQUEST($groupsz) sent" ${LOG} >/dev/null 35 grep "SSH2_MSG_KEX_DH_GEX_REQUEST($groupsz) sent" ${LOG} >/dev/null
33 if [ $? != 0 ]; then 36 if [ $? != 0 ]; then
34 got=`egrep "SSH2_MSG_KEX_DH_GEX_REQUEST(.*) sent" ${LOG}` 37 got=`egrep "SSH2_MSG_KEX_DH_GEX_REQUEST(.*) sent" ${LOG}`
35 fail "$tid unexpected GEX sizes, expected $groupsz, got $got" 38 fail "$tid unexpected GEX sizes, expected $groupsz, got $got"
36 fi 39 fi
37 # check what we got (depends on contents of system moduli file) 40 # check what we got.
38 gotbits="`awk '/bits set:/{print $4}' ${LOG} | head -1 | cut -f2 -d/`" 41 gotbits="`awk '/bits set:/{print $4}' ${LOG} | head -1 | cut -f2 -d/`"
39 if [ "$gotbits" -lt "$bits" ]; then 42 trace "expected '$bits' got '$gotbits'"
43 if [ -z "$gotbits" ] || [ "$gotbits" -lt "$bits" ]; then
40 fatal "$tid expected $bits bit group, got $gotbits" 44 fatal "$tid expected $bits bit group, got $gotbits"
41 fi 45 fi
42} 46}
@@ -52,7 +56,7 @@ check()
52 done 56 done
53} 57}
54 58
55#check 2048 3des-cbc 59check 3072 3des-cbc # 112 bits.
56check 3072 `${SSH} -Q cipher | grep 128` 60check 3072 `${SSH} -Q cipher | grep 128`
57check 7680 `${SSH} -Q cipher | grep 192` 61check 7680 `${SSH} -Q cipher | grep 192`
58check 8192 `${SSH} -Q cipher | grep 256` 62check 8192 `${SSH} -Q cipher | grep 256`