summaryrefslogtreecommitdiff
path: root/regress/rekey.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/rekey.sh')
-rw-r--r--regress/rekey.sh24
1 files changed, 20 insertions, 4 deletions
diff --git a/regress/rekey.sh b/regress/rekey.sh
index 3576a2a01..736da9f92 100644
--- a/regress/rekey.sh
+++ b/regress/rekey.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: rekey.sh,v 1.5 2013/05/16 03:33:30 dtucker Exp $ 1# $OpenBSD: rekey.sh,v 1.6 2013/05/16 04:26:10 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 verbose "rekeylimit ${s}" 15 verbose "client 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 \
@@ -30,7 +30,7 @@ for s in 16 1k 128k 256k; do
30done 30done
31 31
32for s in 5 10; do 32for s in 5 10; do
33 verbose "rekeylimit default ${s}" 33 verbose "client 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 \
@@ -48,7 +48,7 @@ for s in 5 10; do
48done 48done
49 49
50for s in 5 10; do 50for s in 5 10; do
51 verbose "rekeylimit default ${s} no data" 51 verbose "client rekeylimit default ${s} no data"
52 rm -f ${COPY} ${LOG} 52 rm -f ${COPY} ${LOG}
53 ${SSH} -oCompression=no -oRekeyLimit="default $s" -F \ 53 ${SSH} -oCompression=no -oRekeyLimit="default $s" -F \
54 $OBJ/ssh_proxy somehost "sleep $s;sleep 3" 54 $OBJ/ssh_proxy somehost "sleep $s;sleep 3"
@@ -63,4 +63,20 @@ for s in 5 10; do
63 fi 63 fi
64done 64done
65 65
66echo "rekeylimit default 5" >>$OBJ/sshd_proxy
67for s in 5 10; do
68 verbose "server rekeylimit default ${s} no data"
69 rm -f ${COPY} ${LOG}
70 ${SSH} -oCompression=no -F $OBJ/ssh_proxy somehost "sleep $s;sleep 3"
71 if [ $? -ne 0 ]; then
72 fail "ssh failed"
73 fi
74 n=`grep 'NEWKEYS sent' ${LOG} | wc -l`
75 n=`expr $n - 1`
76 trace "$n rekeying(s)"
77 if [ $n -lt 1 ]; then
78 fail "no rekeying occured"
79 fi
80done
81
66rm -f ${COPY} ${DATA} 82rm -f ${COPY} ${DATA}