- dtucker@cvs.openbsd.org 2013/11/07 00:12:05
[regress/rekey.sh] Test rekeying for every Cipher, MAC and KEX, plus test every KEX with the GCM ciphers.
This commit is contained in:
parent
234557762b
commit
651dc8b259
|
@ -27,6 +27,10 @@
|
||||||
- dtucker@cvs.openbsd.org 2013/11/04 12:27:42
|
- dtucker@cvs.openbsd.org 2013/11/04 12:27:42
|
||||||
[regress/rekey.sh]
|
[regress/rekey.sh]
|
||||||
Test rekeying with all KexAlgorithms.
|
Test rekeying with all KexAlgorithms.
|
||||||
|
- dtucker@cvs.openbsd.org 2013/11/07 00:12:05
|
||||||
|
[regress/rekey.sh]
|
||||||
|
Test rekeying for every Cipher, MAC and KEX, plus test every KEX with
|
||||||
|
the GCM ciphers.
|
||||||
|
|
||||||
20131104
|
20131104
|
||||||
- (djm) OpenBSD CVS Sync
|
- (djm) OpenBSD CVS Sync
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: rekey.sh,v 1.9 2013/11/04 12:27:42 dtucker Exp $
|
# $OpenBSD: rekey.sh,v 1.10 2013/11/07 00:12:05 dtucker Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="rekey"
|
tid="rekey"
|
||||||
|
@ -7,17 +7,22 @@ LOG=${TEST_SSH_LOGFILE}
|
||||||
|
|
||||||
rm -f ${LOG}
|
rm -f ${LOG}
|
||||||
|
|
||||||
kexalgs="curve25519-sha256@libssh.org ecdh-sha2-nistp256 \
|
opts=""
|
||||||
ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group-exchange-sha256 \
|
for i in `${SSH} -Q kex`; do
|
||||||
diffie-hellman-group-exchange-sha1 diffie-hellman-group14-sha1 \
|
opts="$opts KexAlgorithms=$i"
|
||||||
diffie-hellman-group1-sha1"
|
done
|
||||||
|
for i in `${SSH} -Q cipher`; do
|
||||||
|
opts="$opts Ciphers=$i"
|
||||||
|
done
|
||||||
|
for i in `${SSH} -Q mac`; do
|
||||||
|
opts="$opts MACs=$i"
|
||||||
|
done
|
||||||
|
|
||||||
for s in 16 1k 128k 256k; do
|
for opt in $opts; do
|
||||||
for a in $kexalgs; do
|
verbose "client rekey $opt"
|
||||||
verbose "client rekeylimit ${s} ${a}"
|
|
||||||
rm -f ${COPY} ${LOG}
|
rm -f ${COPY} ${LOG}
|
||||||
cat $DATA | \
|
cat $DATA | \
|
||||||
${SSH} -oCompression=no -oRekeyLimit=$s -oKexAlgorithms=$a \
|
${SSH} -oCompression=no -oRekeyLimit=16 -o$opt \
|
||||||
-v -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
|
-v -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
fail "ssh failed"
|
fail "ssh failed"
|
||||||
|
@ -30,6 +35,47 @@ for s in 16 1k 128k 256k; do
|
||||||
fail "no rekeying occured"
|
fail "no rekeying occured"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# GCM is magical so test with all KexAlgorithms
|
||||||
|
if ${SSH} -Q cipher | grep gcm@openssh.com >/dev/null ; then
|
||||||
|
for c in `${SSH} -Q cipher | grep gcm@openssh.com`; do
|
||||||
|
for kex in `${SSH} -Q kex`; do
|
||||||
|
verbose "client rekey $c $kex"
|
||||||
|
rm -f ${COPY} ${LOG}
|
||||||
|
cat $DATA | \
|
||||||
|
${SSH} -oCompression=no -oRekeyLimit=16 \
|
||||||
|
-oCiphers=$c -oKexAlgorithms=$kex \
|
||||||
|
-v -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
|
||||||
|
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
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
for s in 16 1k 128k 256k; do
|
||||||
|
verbose "client rekeylimit ${s}"
|
||||||
|
rm -f ${COPY} ${LOG}
|
||||||
|
cat $DATA | \
|
||||||
|
${SSH} -oCompression=no -oRekeyLimit=$s \
|
||||||
|
-v -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
|
||||||
|
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
|
done
|
||||||
|
|
||||||
for s in 5 10; do
|
for s in 5 10; do
|
||||||
|
|
Loading…
Reference in New Issue