diff --git a/test/config.py b/test/config.py index a68de77d6e..7fdfb7c4ed 100644 --- a/test/config.py +++ b/test/config.py @@ -46,6 +46,7 @@ args_ping = None have_lua = False have_nghttp2 = False have_kerberos = False +have_libgcrypt16 = False have_libgcrypt17 = False test_env = None @@ -91,10 +92,12 @@ def getTsharkInfo(): global have_lua global have_nghttp2 global have_kerberos + global have_libgcrypt16 global have_libgcrypt17 have_lua = False have_nghttp2 = False have_kerberos = False + have_libgcrypt16 = False have_libgcrypt17 = False try: tshark_v_blob = str(subprocess.check_output((cmd_tshark, '--version'), stderr=subprocess.PIPE)) @@ -106,6 +109,7 @@ def getTsharkInfo(): if re.search('(with +MIT +Kerberos|with +Heimdal +Kerberos)', tshark_v): have_kerberos = True gcry_m = re.search('with +Gcrypt +([0-9]+\.[0-9]+)', tshark_v) + have_libgcrypt16 = gcry_m and float(gcry_m.group(1)) >= 1.6 have_libgcrypt17 = gcry_m and float(gcry_m.group(1)) >= 1.7 except: pass diff --git a/test/suite_decryption.py b/test/suite_decryption.py index a007b6f8e7..615cf0ba56 100644 --- a/test/suite_decryption.py +++ b/test/suite_decryption.py @@ -68,9 +68,12 @@ class case_decrypt_80211(subprocesstest.SubprocessTestCase): def test_80211_wpa_tdls(self): '''WPA decode traffic in a TDLS (Tunneled Direct-Link Setup) session (802.11z)''' + if not config.have_libgcrypt16: + self.skipTest('Requires GCrypt 1.6 or later.') # Included in git sources test/captures/wpa-test-decode-tdls.pcap.gz capture_file = os.path.join(config.capture_dir, 'wpa-test-decode-tdls.pcap.gz') self.runProcess((config.cmd_tshark, + #'-ouat:80211_keys:"wpa-pwd","12345678"', '-o', 'wlan.enable_decryption: TRUE', '-r', capture_file, '-Y', 'icmp',