diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/rekey.sh | 26 |
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 | ||
4 | tid="rekey during transfer data" | 4 | tid="rekey during transfer data" |
@@ -12,7 +12,7 @@ touch ${DATA} | |||
12 | dd if=/bin/ls${EXEEXT} of=${DATA} bs=1k seek=511 count=1 > /dev/null 2>&1 | 12 | dd if=/bin/ls${EXEEXT} of=${DATA} bs=1k seek=511 count=1 > /dev/null 2>&1 |
13 | 13 | ||
14 | for s in 16 1k 128k 256k; do | 14 | for 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 |
30 | done | 30 | done |
31 | 31 | ||
32 | for s in 5 10 15 ; do | 32 | for 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 |
48 | done | 48 | done |
49 | 49 | ||
50 | for 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 | ||
64 | done | ||
65 | |||
50 | rm -f ${COPY} ${DATA} | 66 | rm -f ${COPY} ${DATA} |