summaryrefslogtreecommitdiffstats
path: root/regress/putty-transfer.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-03-12 14:17:00 +0100
committerDamien Miller <djm@mindrot.org>2008-03-12 14:17:00 +0100
commitaf78493bba42cd4351eded064fb63b81fa2867a9 (patch)
tree0eca81431c4b72d3cc1a6f3119a95ad7ffa82fa8 /regress/putty-transfer.sh
parent - djm@cvs.openbsd.org 2007/12/12 05:04:03 (diff)
downloadopenssh-af78493bba42cd4351eded064fb63b81fa2867a9.tar.xz
openssh-af78493bba42cd4351eded064fb63b81fa2867a9.zip
- djm@cvs.openbsd.org 2007/12/21 04:13:53
[regress/Makefile regress/test-exec.sh regress/putty-ciphers.sh] [regress/putty-kex.sh regress/putty-transfer.sh regress/ssh2putty.sh] basic (crypto, kex and transfer) interop regression tests against putty To run these, install putty and run "make interop-tests" from the build directory - the tests aren't run by default yet.
Diffstat (limited to 'regress/putty-transfer.sh')
-rw-r--r--regress/putty-transfer.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/regress/putty-transfer.sh b/regress/putty-transfer.sh
new file mode 100644
index 000000000..0a4f34ee6
--- /dev/null
+++ b/regress/putty-transfer.sh
@@ -0,0 +1,45 @@
+# $OpenBSD: putty-transfer.sh,v 1.1 2007/12/21 04:13:53 djm Exp $
+# Placed in the Public Domain.
+
+tid="putty transfer data"
+
+DATA=/bin/ls
+COPY=${OBJ}/copy
+
+set -e
+
+if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
+ fatal "putty interop tests not enabled"
+fi
+
+# XXX support protocol 1 too
+for p in 2; do
+ for c in 0 1 ; do
+ verbose "$tid: proto $p compression $c"
+ rm -f ${COPY}
+ cp ${OBJ}/.putty/sessions/localhost_proxy \
+ ${OBJ}/.putty/sessions/compression_$c
+ echo "Compression=$c" >> ${OBJ}/.putty/sessions/kex_$k
+ env HOME=$PWD ${PLINK} -load compression_$c -batch \
+ -i putty.rsa$p 127.0.0.1 cat ${DATA} > ${COPY}
+ if [ $? -ne 0 ]; then
+ fail "ssh cat $DATA failed"
+ fi
+ cmp ${DATA} ${COPY} || fail "corrupted copy"
+
+ for s in 10 100 1k 32k 64k 128k 256k; do
+ trace "proto $p compression $c dd-size ${s}"
+ rm -f ${COPY}
+ dd if=$DATA obs=${s} 2> /dev/null | \
+ env HOME=$PWD ${PLINK} -load compression_$c \
+ -batch -i putty.rsa$p 127.0.0.1 \
+ "cat > ${COPY}"
+ if [ $? -ne 0 ]; then
+ fail "ssh cat $DATA failed"
+ fi
+ cmp $DATA ${COPY} || fail "corrupted copy"
+ done
+ done
+done
+rm -f ${COPY}
+