diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-05-17 09:44:20 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-05-17 09:44:20 +1000 |
commit | 14490fe7b0f45b1b19f8a3dc10eb3d214f27f5bd (patch) | |
tree | e59823c0bf795b57e42fea188654833c71fcf9b4 | |
parent | c31c8729c15f83fba14ef9da0d66bda6215ff69a (diff) |
- dtucker@cvs.openbsd.org 2013/05/16 04:26:10
[regress/rekey.sh]
add server-side rekey test
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | regress/rekey.sh | 24 |
2 files changed, 23 insertions, 4 deletions
@@ -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 | ||
40 | 20130516 | 43 | 20130516 |
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 | ||
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 | 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 | |||
30 | done | 30 | done |
31 | 31 | ||
32 | for s in 5 10; do | 32 | for 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 | |||
48 | done | 48 | done |
49 | 49 | ||
50 | for s in 5 10; do | 50 | for 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 |
64 | done | 64 | done |
65 | 65 | ||
66 | echo "rekeylimit default 5" >>$OBJ/sshd_proxy | ||
67 | for 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 | ||
80 | done | ||
81 | |||
66 | rm -f ${COPY} ${DATA} | 82 | rm -f ${COPY} ${DATA} |