]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - crypto/openssh/regress/try-ciphers.sh
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / crypto / openssh / regress / try-ciphers.sh
1 #       $OpenBSD: try-ciphers.sh,v 1.22 2013/11/21 03:18:51 djm Exp $
2 #       Placed in the Public Domain.
3
4 tid="try ciphers"
5
6 for c in `${SSH} -Q cipher`; do
7         n=0
8         for m in `${SSH} -Q mac`; do
9                 trace "proto 2 cipher $c mac $m"
10                 verbose "test $tid: proto 2 cipher $c mac $m"
11                 ${SSH} -F $OBJ/ssh_proxy -2 -m $m -c $c somehost true
12                 if [ $? -ne 0 ]; then
13                         fail "ssh -2 failed with mac $m cipher $c"
14                 fi
15                 # No point trying all MACs for AEAD ciphers since they
16                 # are ignored.
17                 if ssh -Q cipher-auth | grep "^${c}\$" >/dev/null 2>&1 ; then
18                         break
19                 fi
20                 n=`expr $n + 1`
21         done
22 done
23
24 ciphers="3des blowfish"
25 for c in $ciphers; do
26         trace "proto 1 cipher $c"
27         verbose "test $tid: proto 1 cipher $c"
28         ${SSH} -F $OBJ/ssh_proxy -1 -c $c somehost true
29         if [ $? -ne 0 ]; then
30                 fail "ssh -1 failed with cipher $c"
31         fi
32 done
33