aboutsummaryrefslogtreecommitdiffstats
path: root/test/config.sh
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-06-02 22:05:10 +0200
committerPeter Wu <peter@lekensteyn.nl>2017-06-02 22:04:21 +0000
commit57b0527821b69dc8aa0786a3b5a425192795aff2 (patch)
tree4f01e3f4ac81d19d8ca3afa9a85a96f99c7c73bd /test/config.sh
parenta86f6603fc8b66a46ce21d18990f2058110acf27 (diff)
Add ChaCha20-Poly1305 decryption support for TLS 1.2 and 1.3
Implements all seven AEAD_CHACHA20_POLY1305 cipher suites from RFC 7905 (for TLS 1.2) and the final missing one for TLS 1.3 (draft -20). New test captures (created using OpenSSL_1_1_0-pre6-2528-g042597b0a) also serve as tests for TLS 1.3 decryption support. Change-Id: Ice6d639c9c7b7bc23a6ff5fb4832d02694abd8c4 Ping-Bug: 12779 Reviewed-on: https://code.wireshark.org/review/21902 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'test/config.sh')
-rwxr-xr-xtest/config.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/config.sh b/test/config.sh
index 7a59ecdeec..6b9d8f339d 100755
--- a/test/config.sh
+++ b/test/config.sh
@@ -106,20 +106,32 @@ export WIRESHARK_QUIT_AFTER_CAPTURE="True"
CAPTURE_DIR="$TESTS_DIR/captures/"
+TSHARK_VERSION=$($TSHARK -v | tr '\n' ' ')
+
# Figure out if we were built with lua or not so we can skip the lua tests if we
# don't have it.
-$TSHARK -v | grep -q "with Lua"
+echo "$TSHARK_VERSION" | grep -q "with Lua"
HAVE_LUA=$?
# Check whether we need to skip the HTTP2/HPACK decryption test.
-$TSHARK -v | tr '\n' ' '| grep -q "with nghttp2"
+echo "$TSHARK_VERSION" | grep -q "with nghttp2"
HAVE_NGHTTP2=$?
# Check whether we need to skip a certain decryption test.
# XXX What do we print for Nettle?
-$TSHARK -v | tr '\n' ' '| egrep -q "with MIT Kerberos|with Heimdal Kerberos"
+echo "$TSHARK_VERSION" | egrep -q "with MIT Kerberos|with Heimdal Kerberos"
HAVE_KERBEROS=$?
+# first version is "compiled with", second is "running on" version.
+GCRY_VERSION=$(echo "$TSHARK_VERSION" | grep -oE 'Gcrypt [1-9]+(\.[1-9]+)?' | sed -n '1s/Gcrypt //p')
+if [ -n "$GCRY_VERSION" ] && ! echo "$GCRY_VERSION" | grep -q '1\.[456]'; then
+ # Current minimum Gcrypt version is 1.4.2,
+ # assume 1.7 or newer if not 1,4, 1.5 or 1.6.
+ HAVE_LIBGCRYPT17=true
+else
+ HAVE_LIBGCRYPT17=false
+fi
+
HAVE_ICONV="False"
hash iconv 2>/dev/null && HAVE_ICONV="True"