From 014f1b23082d8993dd0ca34265586073392ccb31 Mon Sep 17 00:00:00 2001 From: djm Date: Sun, 29 Jun 2008 22:07:56 +0000 Subject: [PATCH] - djm@cvs.openbsd.org 2008/06/28 13:57:25 [regress/Makefile regress/test-exec.sh regress/conch-ciphers.sh] very basic regress test against Twisted Conch in "make interop" target (conch is available in ports/devel/py-twisted/conch); ok markus@ --- ChangeLog | 7 ++++++- regress/Makefile | 4 ++-- regress/conch-ciphers.sh | 30 ++++++++++++++++++++++++++++++ regress/test-exec.sh | 12 +++++++++++- 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 regress/conch-ciphers.sh diff --git a/ChangeLog b/ChangeLog index 506d9869..979c2844 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,8 +4,13 @@ [regress/Makefile regress/key-options.sh] Add regress test for key options. ok djm@ - dtucker@cvs.openbsd.org 2008/06/11 23:11:40 - [Makefile] + [regress/Makefile] Don't run cipher-speed test by default; mistakenly enabled by me + - djm@cvs.openbsd.org 2008/06/28 13:57:25 + [regress/Makefile regress/test-exec.sh regress/conch-ciphers.sh] + very basic regress test against Twisted Conch in "make interop" + target (conch is available in ports/devel/py-twisted/conch); + ok markus@ 20080629 - (djm) OpenBSD CVS Sync diff --git a/regress/Makefile b/regress/Makefile index 6ec310fb..3b8ea245 100644 --- a/regress/Makefile +++ b/regress/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.47 2008/06/11 23:11:40 dtucker Exp $ +# $OpenBSD: Makefile,v 1.48 2008/06/28 13:57:25 djm Exp $ REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec tests: $(REGRESS_TARGETS) @@ -52,7 +52,7 @@ LTESTS= connect \ localcommand \ forcecommand -INTEROP_TESTS= putty-transfer putty-ciphers putty-kex +INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers #INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp USER!= id -un diff --git a/regress/conch-ciphers.sh b/regress/conch-ciphers.sh new file mode 100644 index 00000000..c371d303 --- /dev/null +++ b/regress/conch-ciphers.sh @@ -0,0 +1,30 @@ +# $OpenBSD: conch-ciphers.sh,v 1.1 2008/06/28 13:57:25 djm Exp $ +# Placed in the Public Domain. + +tid="conch ciphers" + +DATA=/bin/ls +COPY=${OBJ}/copy + +set -e + +if test "x$REGRESS_INTEROP_CONCH" != "xyes" ; then + fatal "conch interop tests not enabled" +fi + +start_sshd + +for c in aes256-ctr aes256-cbc aes192-ctr aes192-cbc aes128-ctr aes128-cbc \ + cast128-cbc blowfish 3des-cbc ; do + verbose "$tid: cipher $c" + rm -f ${COPY} + ${CONCH} --identity $OBJ/rsa --port $PORT --user $USER \ + --known-hosts $OBJ/known_hosts \ + 127.0.0.1 cat ${DATA} > ${COPY} 2>/dev/null + if [ $? -ne 0 ]; then + fail "ssh cat $DATA failed" + fi + cmp ${DATA} ${COPY} || fail "corrupted copy" +done +rm -f ${COPY} + diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 72fc9995..652bd49d 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.34 2008/06/10 15:28:49 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.35 2008/06/28 13:57:25 djm Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -72,6 +72,7 @@ SCP=scp # Interop testing PLINK=/usr/local/bin/plink PUTTYGEN=/usr/local/bin/puttygen +CONCH=/usr/local/bin/conch if [ "x$TEST_SSH_SSH" != "x" ]; then SSH="${TEST_SSH_SSH}" @@ -114,6 +115,9 @@ if [ "x$TEST_SSH_PUTTYGEN" != "x" ]; then *) PUTTYGEN=`which ${TEST_SSH_PUTTYGEN} 2>/dev/null` ;; esac fi +if [ "x$TEST_SSH_CONCH" != "x" ]; then + CONCH="${TEST_SSH_CONCH}" +fi # Path to sshd must be absolute for rexec case "$SSHD" in @@ -287,6 +291,12 @@ for t in rsa rsa1; do done chmod 644 $OBJ/authorized_keys_$USER +# Activate Twisted Conch tests if the binary is present +REGRESS_INTEROP_CONCH=no +if test -x "$CONCH" ; then + REGRESS_INTEROP_CONCH=yes +fi + # If PuTTY is present and we are running a PuTTY test, prepare keys and # configuration REGRESS_INTEROP_PUTTY=no -- 2.45.1