]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - crypto/openssh/regress/try-ciphers.sh
Upgrade to OpenSSH 7.6p1. This will be followed shortly by 7.7p1.
[FreeBSD/FreeBSD.git] / crypto / openssh / regress / try-ciphers.sh
1 #       $OpenBSD: try-ciphers.sh,v 1.26 2017/04/30 23:34:55 djm Exp $
2 #       Placed in the Public Domain.
3
4 tid="try ciphers"
5
6 cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
7
8 for c in `${SSH} -Q cipher`; do
9         n=0
10         for m in `${SSH} -Q mac`; do
11                 trace "cipher $c mac $m"
12                 verbose "test $tid: cipher $c mac $m"
13                 cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
14                 echo "Ciphers=$c" >> $OBJ/sshd_proxy
15                 echo "MACs=$m" >> $OBJ/sshd_proxy
16                 ${SSH} -F $OBJ/ssh_proxy -m $m -c $c somehost true
17                 if [ $? -ne 0 ]; then
18                         fail "ssh failed with mac $m cipher $c"
19                 fi
20                 # No point trying all MACs for AEAD ciphers since they
21                 # are ignored.
22                 if ${SSH} -Q cipher-auth | grep "^${c}\$" >/dev/null 2>&1 ; then
23                         break
24                 fi
25                 n=`expr $n + 1`
26         done
27 done
28