summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regress/dhgex.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/regress/dhgex.sh b/regress/dhgex.sh
index ceb3b5d23..ae64a9fb6 100644
--- a/regress/dhgex.sh
+++ b/regress/dhgex.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: dhgex.sh,v 1.5 2019/09/27 05:25:12 dtucker 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
4tid="dhgex" 4tid="dhgex"
@@ -28,9 +28,6 @@ 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}
34 # check what we request 31 # check what we request
35 grep "SSH2_MSG_KEX_DH_GEX_REQUEST($groupsz) sent" ${LOG} >/dev/null 32 grep "SSH2_MSG_KEX_DH_GEX_REQUEST($groupsz) sent" ${LOG} >/dev/null
36 if [ $? != 0 ]; then 33 if [ $? != 0 ]; then
@@ -38,7 +35,8 @@ ssh_test_dhgex()
38 fail "$tid unexpected GEX sizes, expected $groupsz, got $got" 35 fail "$tid unexpected GEX sizes, expected $groupsz, got $got"
39 fi 36 fi
40 # check what we got. 37 # check what we got.
41 gotbits="`awk '/bits set:/{print $4}' ${LOG} | head -1 | cut -f2 -d/`" 38 gotbits="`awk 'BEGIN{FS="/"}/bits set:/{print $2}' ${LOG} |
39 head -1 | tr -d '\r\n'`"
42 trace "expected '$bits' got '$gotbits'" 40 trace "expected '$bits' got '$gotbits'"
43 if [ -z "$gotbits" ] || [ "$gotbits" -lt "$bits" ]; then 41 if [ -z "$gotbits" ] || [ "$gotbits" -lt "$bits" ]; then
44 fatal "$tid expected $bits bit group, got $gotbits" 42 fatal "$tid expected $bits bit group, got $gotbits"