[openssh-commits] [openssh] 02/02: upstream: Test for empty result in expected bits. Remove CRs from log

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Sep 27 15:36:51 AEST 2019


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 4d59f7a5169c451ebf559aedec031ac9da2bf80c
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Fri Sep 27 05:25:12 2019 +0000

    upstream: Test for empty result in expected bits. Remove CRs from log
    
    as they confuse tools on some platforms.  Re-enable the 3des-cbc test.
    
    OpenBSD-Regress-ID: edf536d4f29fc1ba412889b37247a47f1b49d250
---
 regress/dhgex.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/regress/dhgex.sh b/regress/dhgex.sh
index 61fc178e..ceb3b5d2 100644
--- a/regress/dhgex.sh
+++ b/regress/dhgex.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: dhgex.sh,v 1.4 2017/05/08 01:52:49 djm Exp $
+#	$OpenBSD: dhgex.sh,v 1.5 2019/09/27 05:25:12 dtucker Exp $
 #	Placed in the Public Domain.
 
 tid="dhgex"
@@ -28,15 +28,19 @@ ssh_test_dhgex()
 	if [ $? -ne 0 ]; then
 		fail "ssh failed ($@)"
 	fi
+	# Remove CRs.
+	sed 's/\r//' ${LOG} >${LOG}.new
+	mv ${LOG}.new ${LOG}
 	# check what we request
 	grep "SSH2_MSG_KEX_DH_GEX_REQUEST($groupsz) sent" ${LOG} >/dev/null
 	if [ $? != 0 ]; then
 		got=`egrep "SSH2_MSG_KEX_DH_GEX_REQUEST(.*) sent" ${LOG}`
 		fail "$tid unexpected GEX sizes, expected $groupsz, got $got"
 	fi
-	# check what we got (depends on contents of system moduli file)
+	# check what we got.
 	gotbits="`awk '/bits set:/{print $4}' ${LOG} | head -1 | cut -f2 -d/`"
-	if [ "$gotbits" -lt "$bits" ]; then
+	trace "expected '$bits' got '$gotbits'"
+	if [ -z "$gotbits" ] || [ "$gotbits" -lt "$bits" ]; then
 		fatal "$tid expected $bits bit group, got $gotbits"
 	fi
 }
@@ -52,7 +56,7 @@ check()
 	done
 }
 
-#check 2048 3des-cbc
+check 3072 3des-cbc  # 112 bits.
 check 3072 `${SSH} -Q cipher | grep 128`
 check 7680 `${SSH} -Q cipher | grep 192`
 check 8192 `${SSH} -Q cipher | grep 256`

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list