diff options
Diffstat (limited to 'regress/dhgex.sh')
-rw-r--r-- | regress/dhgex.sh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/regress/dhgex.sh b/regress/dhgex.sh index 61fc178e8..ae64a9fb6 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.6 2019/10/06 11:49:50 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="dhgex" | 4 | tid="dhgex" |
@@ -34,9 +34,11 @@ ssh_test_dhgex() | |||
34 | got=`egrep "SSH2_MSG_KEX_DH_GEX_REQUEST(.*) sent" ${LOG}` | 34 | got=`egrep "SSH2_MSG_KEX_DH_GEX_REQUEST(.*) sent" ${LOG}` |
35 | fail "$tid unexpected GEX sizes, expected $groupsz, got $got" | 35 | fail "$tid unexpected GEX sizes, expected $groupsz, got $got" |
36 | fi | 36 | fi |
37 | # check what we got (depends on contents of system moduli file) | 37 | # check what we got. |
38 | gotbits="`awk '/bits set:/{print $4}' ${LOG} | head -1 | cut -f2 -d/`" | 38 | gotbits="`awk 'BEGIN{FS="/"}/bits set:/{print $2}' ${LOG} | |
39 | if [ "$gotbits" -lt "$bits" ]; then | 39 | head -1 | tr -d '\r\n'`" |
40 | trace "expected '$bits' got '$gotbits'" | ||
41 | if [ -z "$gotbits" ] || [ "$gotbits" -lt "$bits" ]; then | ||
40 | fatal "$tid expected $bits bit group, got $gotbits" | 42 | fatal "$tid expected $bits bit group, got $gotbits" |
41 | fi | 43 | fi |
42 | } | 44 | } |
@@ -52,7 +54,7 @@ check() | |||
52 | done | 54 | done |
53 | } | 55 | } |
54 | 56 | ||
55 | #check 2048 3des-cbc | 57 | check 3072 3des-cbc # 112 bits. |
56 | check 3072 `${SSH} -Q cipher | grep 128` | 58 | check 3072 `${SSH} -Q cipher | grep 128` |
57 | check 7680 `${SSH} -Q cipher | grep 192` | 59 | check 7680 `${SSH} -Q cipher | grep 192` |
58 | check 8192 `${SSH} -Q cipher | grep 256` | 60 | check 8192 `${SSH} -Q cipher | grep 256` |