summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--regress/rekey.sh35
2 files changed, 36 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cff12dd94..aabd6acd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
4320130516 4620130516
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
4tid="rekey during transfer data" 4tid="rekey"
5 5
6DATA=${OBJ}/data 6DATA=${OBJ}/data
7COPY=${OBJ}/copy 7COPY=${OBJ}/copy
@@ -79,4 +79,35 @@ for s in 5 10; do
79 fi 79 fi
80done 80done
81 81
82verbose "rekeylimit parsing"
83for 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
111done
112
82rm -f ${COPY} ${DATA} 113rm -f ${COPY} ${DATA}