summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-05-17 09:44:20 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-05-17 09:44:20 +1000
commit14490fe7b0f45b1b19f8a3dc10eb3d214f27f5bd (patch)
treee59823c0bf795b57e42fea188654833c71fcf9b4
parentc31c8729c15f83fba14ef9da0d66bda6215ff69a (diff)
- dtucker@cvs.openbsd.org 2013/05/16 04:26:10
[regress/rekey.sh] add server-side rekey test
-rw-r--r--ChangeLog3
-rw-r--r--regress/rekey.sh24
2 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b44002024..cff12dd94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,9 @@
36 - dtucker@cvs.openbsd.org 2013/05/16 03:33:30 36 - dtucker@cvs.openbsd.org 2013/05/16 03:33:30
37 [regress/rekey.sh] 37 [regress/rekey.sh]
38 test rekeying when there's no data being transferred 38 test rekeying when there's no data being transferred
39 - dtucker@cvs.openbsd.org 2013/05/16 04:26:10
40 [regress/rekey.sh]
41 add server-side rekey test
39 42
4020130516 4320130516
41 - (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be 44 - (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be
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}