diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-10 00:27:24 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-02-10 02:40:28 +0000 |
commit | a2b8818c5d21cfcba443625251f691a2ea3a29c7 (patch) | |
tree | 8fe1fe448cde57eecf71a7bcd57186661b90313f /regress/rekey.sh | |
parent | d399ecd8eb7d4aed3b7ba0d2727e619607fb901b (diff) | |
parent | ee8d8b97cc2c6081df3af453a228992b87309ec4 (diff) |
Merge 6.5p1.
* New upstream release (http://www.openssh.com/txt/release-6.5,
LP: #1275068):
- ssh(1): Add support for client-side hostname canonicalisation using a
set of DNS suffixes and rules in ssh_config(5). This allows
unqualified names to be canonicalised to fully-qualified domain names
to eliminate ambiguity when looking up keys in known_hosts or checking
host certificate names (closes: #115286).
Diffstat (limited to 'regress/rekey.sh')
-rw-r--r-- | regress/rekey.sh | 63 |
1 files changed, 48 insertions, 15 deletions
diff --git a/regress/rekey.sh b/regress/rekey.sh index 8eb7efaf9..cf9401ea0 100644 --- a/regress/rekey.sh +++ b/regress/rekey.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: rekey.sh,v 1.8 2013/05/17 04:29:14 dtucker Exp $ | 1 | # $OpenBSD: rekey.sh,v 1.14 2013/11/21 03:18:51 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="rekey" | 4 | tid="rekey" |
@@ -7,34 +7,67 @@ LOG=${TEST_SSH_LOGFILE} | |||
7 | 7 | ||
8 | rm -f ${LOG} | 8 | rm -f ${LOG} |
9 | 9 | ||
10 | for s in 16 1k 128k 256k; do | 10 | # Test rekeying based on data volume only. |
11 | verbose "client rekeylimit ${s}" | 11 | # Arguments will be passed to ssh. |
12 | ssh_data_rekeying() | ||
13 | { | ||
12 | rm -f ${COPY} ${LOG} | 14 | rm -f ${COPY} ${LOG} |
13 | cat $DATA | \ | 15 | ${SSH} <${DATA} -oCompression=no $@ -v -F $OBJ/ssh_proxy somehost \ |
14 | ${SSH} -oCompression=no -oRekeyLimit=$s \ | 16 | "cat > ${COPY}" |
15 | -v -F $OBJ/ssh_proxy somehost "cat > ${COPY}" | ||
16 | if [ $? -ne 0 ]; then | 17 | if [ $? -ne 0 ]; then |
17 | fail "ssh failed" | 18 | fail "ssh failed ($@)" |
18 | fi | 19 | fi |
19 | cmp $DATA ${COPY} || fail "corrupted copy" | 20 | cmp ${DATA} ${COPY} || fail "corrupted copy ($@)" |
20 | n=`grep 'NEWKEYS sent' ${LOG} | wc -l` | 21 | n=`grep 'NEWKEYS sent' ${LOG} | wc -l` |
21 | n=`expr $n - 1` | 22 | n=`expr $n - 1` |
22 | trace "$n rekeying(s)" | 23 | trace "$n rekeying(s)" |
23 | if [ $n -lt 1 ]; then | 24 | if [ $n -lt 1 ]; then |
24 | fail "no rekeying occured" | 25 | fail "no rekeying occured ($@)" |
25 | fi | 26 | fi |
27 | } | ||
28 | |||
29 | increase_datafile_size 300 | ||
30 | |||
31 | opts="" | ||
32 | for i in `${SSH} -Q kex`; do | ||
33 | opts="$opts KexAlgorithms=$i" | ||
34 | done | ||
35 | for i in `${SSH} -Q cipher`; do | ||
36 | opts="$opts Ciphers=$i" | ||
37 | done | ||
38 | for i in `${SSH} -Q mac`; do | ||
39 | opts="$opts MACs=$i" | ||
40 | done | ||
41 | |||
42 | for opt in $opts; do | ||
43 | verbose "client rekey $opt" | ||
44 | ssh_data_rekeying -oRekeyLimit=256k -o$opt | ||
45 | done | ||
46 | |||
47 | # AEAD ciphers are magical so test with all KexAlgorithms | ||
48 | if ${SSH} -Q cipher-auth | grep '^.*$' >/dev/null 2>&1 ; then | ||
49 | for c in `${SSH} -Q cipher-auth`; do | ||
50 | for kex in `${SSH} -Q kex`; do | ||
51 | verbose "client rekey $c $kex" | ||
52 | ssh_data_rekeying -oRekeyLimit=256k -oCiphers=$c -oKexAlgorithms=$kex | ||
53 | done | ||
54 | done | ||
55 | fi | ||
56 | |||
57 | for s in 16 1k 128k 256k; do | ||
58 | verbose "client rekeylimit ${s}" | ||
59 | ssh_data_rekeying -oCompression=no -oRekeyLimit=$s | ||
26 | done | 60 | done |
27 | 61 | ||
28 | for s in 5 10; do | 62 | for s in 5 10; do |
29 | verbose "client rekeylimit default ${s}" | 63 | verbose "client rekeylimit default ${s}" |
30 | rm -f ${COPY} ${LOG} | 64 | rm -f ${COPY} ${LOG} |
31 | cat $DATA | \ | 65 | ${SSH} < ${DATA} -oCompression=no -oRekeyLimit="default $s" -F \ |
32 | ${SSH} -oCompression=no -oRekeyLimit="default $s" -F \ | 66 | $OBJ/ssh_proxy somehost "cat >${COPY};sleep $s;sleep 3" |
33 | $OBJ/ssh_proxy somehost "cat >${COPY};sleep $s;sleep 3" | ||
34 | if [ $? -ne 0 ]; then | 67 | if [ $? -ne 0 ]; then |
35 | fail "ssh failed" | 68 | fail "ssh failed" |
36 | fi | 69 | fi |
37 | cmp $DATA ${COPY} || fail "corrupted copy" | 70 | cmp ${DATA} ${COPY} || fail "corrupted copy" |
38 | n=`grep 'NEWKEYS sent' ${LOG} | wc -l` | 71 | n=`grep 'NEWKEYS sent' ${LOG} | wc -l` |
39 | n=`expr $n - 1` | 72 | n=`expr $n - 1` |
40 | trace "$n rekeying(s)" | 73 | trace "$n rekeying(s)" |
@@ -98,10 +131,10 @@ for size in 16 1k 1K 1m 1M 1g 1G; do | |||
98 | awk '/rekeylimit/{print $3}'` | 131 | awk '/rekeylimit/{print $3}'` |
99 | 132 | ||
100 | if [ "$bytes" != "$b" ]; then | 133 | if [ "$bytes" != "$b" ]; then |
101 | fatal "rekeylimit size: expected $bytes got $b" | 134 | fatal "rekeylimit size: expected $bytes bytes got $b" |
102 | fi | 135 | fi |
103 | if [ "$seconds" != "$s" ]; then | 136 | if [ "$seconds" != "$s" ]; then |
104 | fatal "rekeylimit time: expected $time got $s" | 137 | fatal "rekeylimit time: expected $time seconds got $s" |
105 | fi | 138 | fi |
106 | done | 139 | done |
107 | done | 140 | done |