]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - crypto/openssh/regress/putty-transfer.sh
Upgrade to OpenSSH 7.7p1.
[FreeBSD/FreeBSD.git] / crypto / openssh / regress / putty-transfer.sh
1 #       $OpenBSD: putty-transfer.sh,v 1.6 2018/02/23 03:03:00 djm Exp $
2 #       Placed in the Public Domain.
3
4 tid="putty transfer data"
5
6 if test "x$REGRESS_INTEROP_PUTTY" != "xyes" ; then
7         echo "putty interop tests not enabled"
8         exit 0
9 fi
10
11 for c in 0 1 ; do 
12         verbose "$tid: compression $c"
13         rm -f ${COPY}
14         cp ${OBJ}/.putty/sessions/localhost_proxy \
15             ${OBJ}/.putty/sessions/compression_$c
16         echo "Compression=$c" >> ${OBJ}/.putty/sessions/kex_$k
17         env HOME=$PWD ${PLINK} -load compression_$c -batch \
18             -i ${OBJ}/putty.rsa2 cat ${DATA} > ${COPY}
19         if [ $? -ne 0 ]; then
20                 fail "ssh cat $DATA failed"
21         fi
22         cmp ${DATA} ${COPY}             || fail "corrupted copy"
23
24         for s in 10 100 1k 32k 64k 128k 256k; do
25                 trace "compression $c dd-size ${s}"
26                 rm -f ${COPY}
27                 dd if=$DATA obs=${s} 2> /dev/null | \
28                         env HOME=$PWD ${PLINK} -load compression_$c \
29                             -batch -i ${OBJ}/putty.rsa2 \
30                             "cat > ${COPY}"
31                 if [ $? -ne 0 ]; then
32                         fail "ssh cat $DATA failed"
33                 fi
34                 cmp $DATA ${COPY}       || fail "corrupted copy"
35         done
36 done
37 rm -f ${COPY}
38