summaryrefslogtreecommitdiff
path: root/regress/rekey.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-05-17 09:43:33 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-05-17 09:43:33 +1000
commitc31c8729c15f83fba14ef9da0d66bda6215ff69a (patch)
treebe3c774232df5befcffdcfee4f15abd38da27e90 /regress/rekey.sh
parenta8a62fcc46c19997797846197a6256ed9a777a47 (diff)
- dtucker@cvs.openbsd.org 2013/05/16 03:33:30
[regress/rekey.sh] test rekeying when there's no data being transferred
Diffstat (limited to 'regress/rekey.sh')
-rw-r--r--regress/rekey.sh26
1 files changed, 21 insertions, 5 deletions
diff --git a/regress/rekey.sh b/regress/rekey.sh
index 24d6c9652..3576a2a01 100644
--- a/regress/rekey.sh
+++ b/regress/rekey.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: rekey.sh,v 1.4 2013/05/16 02:10:35 dtucker Exp $ 1# $OpenBSD: rekey.sh,v 1.5 2013/05/16 03:33:30 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="rekey during transfer data" 4tid="rekey during transfer data"
@@ -12,7 +12,7 @@ touch ${DATA}
12dd if=/bin/ls${EXEEXT} of=${DATA} bs=1k seek=511 count=1 > /dev/null 2>&1 12dd if=/bin/ls${EXEEXT} of=${DATA} bs=1k seek=511 count=1 > /dev/null 2>&1
13 13
14for s in 16 1k 128k 256k; do 14for s in 16 1k 128k 256k; do
15 trace "rekeylimit ${s}" 15 verbose "rekeylimit ${s}"
16 rm -f ${COPY} ${LOG} 16 rm -f ${COPY} ${LOG}
17 cat $DATA | \ 17 cat $DATA | \
18 ${SSH} -oCompression=no -oRekeyLimit=$s \ 18 ${SSH} -oCompression=no -oRekeyLimit=$s \
@@ -29,12 +29,12 @@ for s in 16 1k 128k 256k; do
29 fi 29 fi
30done 30done
31 31
32for s in 5 10 15 ; do 32for s in 5 10; do
33 trace "rekeylimit default ${s}" 33 verbose "rekeylimit default ${s}"
34 rm -f ${COPY} ${LOG} 34 rm -f ${COPY} ${LOG}
35 cat $DATA | \ 35 cat $DATA | \
36 ${SSH} -oCompression=no -oRekeyLimit="default $s" -F \ 36 ${SSH} -oCompression=no -oRekeyLimit="default $s" -F \
37 $OBJ/ssh_proxy somehost "cat >${COPY};sleep $s;sleep 5" 37 $OBJ/ssh_proxy somehost "cat >${COPY};sleep $s;sleep 3"
38 if [ $? -ne 0 ]; then 38 if [ $? -ne 0 ]; then
39 fail "ssh failed" 39 fail "ssh failed"
40 fi 40 fi
@@ -47,4 +47,20 @@ for s in 5 10 15 ; do
47 fi 47 fi
48done 48done
49 49
50for s in 5 10; do
51 verbose "rekeylimit default ${s} no data"
52 rm -f ${COPY} ${LOG}
53 ${SSH} -oCompression=no -oRekeyLimit="default $s" -F \
54 $OBJ/ssh_proxy somehost "sleep $s;sleep 3"
55 if [ $? -ne 0 ]; then
56 fail "ssh failed"
57 fi
58 n=`grep 'NEWKEYS sent' ${LOG} | wc -l`
59 n=`expr $n - 1`
60 trace "$n rekeying(s)"
61 if [ $n -lt 1 ]; then
62 fail "no rekeying occured"
63 fi
64done
65
50rm -f ${COPY} ${DATA} 66rm -f ${COPY} ${DATA}