diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-03-28 13:58:29 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-03-28 13:58:29 +0000 |
commit | 3ad84dd7e72ca5675beff2b78664976ea45d5933 (patch) | |
tree | cb0bee8c3a64569efc3c83c07e0343c4807ab778 /regress/usr.bin/ssh | |
parent | e77b2f17a9d8ab58b747e368478e56db4e15a2ac (diff) |
test rekeying (disabled)
Diffstat (limited to 'regress/usr.bin/ssh')
-rw-r--r-- | regress/usr.bin/ssh/rekey.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/regress/usr.bin/ssh/rekey.sh b/regress/usr.bin/ssh/rekey.sh new file mode 100644 index 00000000000..26848d27b56 --- /dev/null +++ b/regress/usr.bin/ssh/rekey.sh @@ -0,0 +1,31 @@ +# $OpenBSD: rekey.sh,v 1.1 2003/03/28 13:58:28 markus Exp $ +# Placed in the Public Domain. + +tid="rekey during transfer data" + +DATA=${OBJ}/data +COPY=${OBJ}/copy +LOG=${OBJ}/log + +rm -f ${COPY} ${LOG} ${DATA} +dd if=/dev/zero of=${DATA} bs=1k count=512 > /dev/null 2>&1 + +for s in 16 1k 128k 256k; do + trace "rekeylimit ${s}" + rm -f ${COPY} + cat $DATA | \ + ${SSH} -oCompression=no -oRekeyLimit=$s \ + -v -F $OBJ/ssh_proxy somehost "cat > ${COPY}" \ + 2> ${LOG} + if [ $? -ne 0 ]; then + fail "ssh failed" + fi + cmp $DATA ${COPY} || fail "corrupted copy" + n=`grep 'NEWKEYS sent' ${LOG} | wc -l` + n=`expr $n - 1` + trace "$n rekeying(s)" + if [ $n -lt 1 ]; then + fail "no rekeying occured" + fi +done +rm -f ${COPY} ${LOG} ${DATA} |