]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - testdata/dnscrypt_queries_chacha.tdir/precheck.sh
Vendor import of Unbound 1.9.6.
[FreeBSD/FreeBSD.git] / testdata / dnscrypt_queries_chacha.tdir / precheck.sh
1 # dnscrypt precheck.sh
2
3 # if no dnscrypt; exit
4 if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
5         echo "have dnscrypt"
6 else
7         echo "no dnscrypt"
8         exit 0
9 fi
10
11 # if no xchacha20 support in unbound; exit
12 if grep "define USE_DNSCRYPT_XCHACHA20 1" $PRE/config.h; then
13         echo "have xchacha20"
14         xchacha20=1
15 else
16         echo "no xchacha20"
17         xchacha20=0
18         exit 0
19 fi
20
21 # if dnscrypt-proxy does not support xchacha20; exit
22 if (dnscrypt-proxy -h 2>&1 | grep -q 'XChaCha20-Poly1305 cipher: present'); then
23                 echo "dnscrypt-proxy has xchacha20"
24 else
25                 echo "dnscrypt-proxy does not have xchacha20"
26                 exit 0
27 fi