From edb1af50441d19fb2dd9ccb4d75bf14473fca584 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 15 May 2014 15:07:53 +1000 Subject: - djm@cvs.openbsd.org 2014/04/21 22:15:37 [dhgex.sh integrity.sh kextype.sh rekey.sh try-ciphers.sh] repair regress tests broken by server-side default cipher/kex/mac changes by ensuring that the option under test is included in the server's algorithm list --- regress/integrity.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'regress/integrity.sh') diff --git a/regress/integrity.sh b/regress/integrity.sh index 852d82690..03d80618c 100644 --- a/regress/integrity.sh +++ b/regress/integrity.sh @@ -1,7 +1,8 @@ -# $OpenBSD: integrity.sh,v 1.12 2013/11/21 03:18:51 djm Exp $ +# $OpenBSD: integrity.sh,v 1.13 2014/04/21 22:15:37 djm Exp $ # Placed in the Public Domain. tid="integrity" +cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak # start at byte 2900 (i.e. after kex) and corrupt at different offsets # XXX the test hangs if we modify the low bytes of the packet length @@ -34,11 +35,15 @@ for m in $macs; do # avoid modifying the high bytes of the length continue fi + cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy # modify output from sshd at offset $off pxy="proxycommand=$cmd | $OBJ/modpipe -wm xor:$off:1" if ssh -Q cipher-auth | grep "^${m}\$" >/dev/null 2>&1 ; then + echo "Ciphers=$m" >> $OBJ/sshd_proxy macopt="-c $m" else + echo "Ciphers=aes128-ctr" >> $OBJ/sshd_proxy + echo "MACs=$m" >> $OBJ/sshd_proxy macopt="-m $m -c aes128-ctr" fi verbose "test $tid: $m @$off" -- cgit v1.2.3 From 43d3ed2dd3feca6d0326c7dc82588d2faa115e92 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 2 Jul 2014 17:01:08 +1000 Subject: - djm@cvs.openbsd.org 2014/05/21 07:04:21 [regress/integrity.sh] when failing because of unexpected output, show the offending output --- ChangeLog | 3 +++ regress/integrity.sh | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'regress/integrity.sh') diff --git a/ChangeLog b/ChangeLog index 1f515b952..be3eacd6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -81,6 +81,9 @@ [regress/Makefile] unit tests for new buffer API; including basic fuzz testing NB. Id sync only. + - djm@cvs.openbsd.org 2014/05/21 07:04:21 + [regress/integrity.sh] + when failing because of unexpected output, show the offending output 20140618 - (tim) [openssh/session.c] Work around to get chroot sftp working on UnixWare diff --git a/regress/integrity.sh b/regress/integrity.sh index 03d80618c..d3a489ff7 100644 --- a/regress/integrity.sh +++ b/regress/integrity.sh @@ -1,4 +1,4 @@ -# $OpenBSD: integrity.sh,v 1.13 2014/04/21 22:15:37 djm Exp $ +# $OpenBSD: integrity.sh,v 1.14 2014/05/21 07:04:21 djm Exp $ # Placed in the Public Domain. tid="integrity" @@ -54,14 +54,14 @@ for m in $macs; do fail "ssh -m $m succeeds with bit-flip at $off" fi ecnt=`expr $ecnt + 1` - output=$(tail -2 $TEST_SSH_LOGFILE | egrep -v "^debug" | \ + out=$(tail -2 $TEST_SSH_LOGFILE | egrep -v "^debug" | \ tr -s '\r\n' '.') - case "$output" in + case "$out" in Bad?packet*) elen=`expr $elen + 1`; skip=3;; Corrupted?MAC* | Decryption?integrity?check?failed*) emac=`expr $emac + 1`; skip=0;; padding*) epad=`expr $epad + 1`; skip=0;; - *) fail "unexpected error mac $m at $off";; + *) fail "unexpected error mac $m at $off: $out";; esac done verbose "test $tid: $ecnt errors: mac $emac padding $epad length $elen" -- cgit v1.2.3