diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/rekey.sh | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/regress/rekey.sh b/regress/rekey.sh index d2542ecd4..24d6c9652 100644 --- a/regress/rekey.sh +++ b/regress/rekey.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: rekey.sh,v 1.3 2013/04/07 02:16:03 dtucker Exp $ | 1 | # $OpenBSD: rekey.sh,v 1.4 2013/05/16 02:10:35 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" |
@@ -13,7 +13,7 @@ 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 | trace "rekeylimit ${s}" | 15 | trace "rekeylimit ${s}" |
16 | rm -f ${COPY} | 16 | rm -f ${COPY} ${LOG} |
17 | cat $DATA | \ | 17 | cat $DATA | \ |
18 | ${SSH} -oCompression=no -oRekeyLimit=$s \ | 18 | ${SSH} -oCompression=no -oRekeyLimit=$s \ |
19 | -v -F $OBJ/ssh_proxy somehost "cat > ${COPY}" | 19 | -v -F $OBJ/ssh_proxy somehost "cat > ${COPY}" |
@@ -28,4 +28,23 @@ for s in 16 1k 128k 256k; do | |||
28 | fail "no rekeying occured" | 28 | fail "no rekeying occured" |
29 | fi | 29 | fi |
30 | done | 30 | done |
31 | |||
32 | for s in 5 10 15 ; do | ||
33 | trace "rekeylimit default ${s}" | ||
34 | rm -f ${COPY} ${LOG} | ||
35 | cat $DATA | \ | ||
36 | ${SSH} -oCompression=no -oRekeyLimit="default $s" -F \ | ||
37 | $OBJ/ssh_proxy somehost "cat >${COPY};sleep $s;sleep 5" | ||
38 | if [ $? -ne 0 ]; then | ||
39 | fail "ssh failed" | ||
40 | fi | ||
41 | cmp $DATA ${COPY} || fail "corrupted copy" | ||
42 | n=`grep 'NEWKEYS sent' ${LOG} | wc -l` | ||
43 | n=`expr $n - 1` | ||
44 | trace "$n rekeying(s)" | ||
45 | if [ $n -lt 1 ]; then | ||
46 | fail "no rekeying occured" | ||
47 | fi | ||
48 | done | ||
49 | |||
31 | rm -f ${COPY} ${DATA} | 50 | rm -f ${COPY} ${DATA} |