diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | regress/rekey.sh | 35 |
2 files changed, 36 insertions, 2 deletions
@@ -39,6 +39,9 @@ | |||
39 | - dtucker@cvs.openbsd.org 2013/05/16 04:26:10 | 39 | - dtucker@cvs.openbsd.org 2013/05/16 04:26:10 |
40 | [regress/rekey.sh] | 40 | [regress/rekey.sh] |
41 | add server-side rekey test | 41 | add server-side rekey test |
42 | - dtucker@cvs.openbsd.org 2013/05/16 05:48:31 | ||
43 | [regress/rekey.sh] | ||
44 | add tests for RekeyLimit parsing | ||
42 | 45 | ||
43 | 20130516 | 46 | 20130516 |
44 | - (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be | 47 | - (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be |
diff --git a/regress/rekey.sh b/regress/rekey.sh index 736da9f92..cefdea534 100644 --- a/regress/rekey.sh +++ b/regress/rekey.sh | |||
@@ -1,7 +1,7 @@ | |||
1 | # $OpenBSD: rekey.sh,v 1.6 2013/05/16 04:26:10 dtucker Exp $ | 1 | # $OpenBSD: rekey.sh,v 1.7 2013/05/16 05:48:31 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" |
5 | 5 | ||
6 | DATA=${OBJ}/data | 6 | DATA=${OBJ}/data |
7 | COPY=${OBJ}/copy | 7 | COPY=${OBJ}/copy |
@@ -79,4 +79,35 @@ for s in 5 10; do | |||
79 | fi | 79 | fi |
80 | done | 80 | done |
81 | 81 | ||
82 | verbose "rekeylimit parsing" | ||
83 | for size in 16 1k 1K 1m 1M 1g 1G; do | ||
84 | for time in 1 1m 1M 1h 1H 1d 1D 1w 1W; do | ||
85 | case $size in | ||
86 | 16) bytes=16 ;; | ||
87 | 1k|1K) bytes=1024 ;; | ||
88 | 1m|1M) bytes=1048576 ;; | ||
89 | 1g|1G) bytes=1073741824 ;; | ||
90 | esac | ||
91 | case $time in | ||
92 | 1) seconds=1 ;; | ||
93 | 1m|1M) seconds=60 ;; | ||
94 | 1h|1H) seconds=3600 ;; | ||
95 | 1d|1D) seconds=86400 ;; | ||
96 | 1w|1W) seconds=604800 ;; | ||
97 | esac | ||
98 | |||
99 | b=`$SUDO ${SSHD} -T -o "rekeylimit $size $time" -f $OBJ/sshd_proxy | \ | ||
100 | awk '/rekeylimit/{print $2}'` | ||
101 | s=`$SUDO ${SSHD} -T -o "rekeylimit $size $time" -f $OBJ/sshd_proxy | \ | ||
102 | awk '/rekeylimit/{print $3}'` | ||
103 | |||
104 | if [ "$bytes" != "$b" ]; then | ||
105 | fatal "rekeylimit size: expected $bytes got $b" | ||
106 | fi | ||
107 | if [ "$seconds" != "$s" ]; then | ||
108 | fatal "rekeylimit time: expected $time got $s" | ||
109 | fi | ||
110 | done | ||
111 | done | ||
112 | |||
82 | rm -f ${COPY} ${DATA} | 113 | rm -f ${COPY} ${DATA} |