forked from osmocom/wireshark
test: require Libgcrypt 1.6 for TDLS test
Dot11DecryptTDLSDeriveKey in epan/crypt/dot11decrypt.c requires Libcrypt 1.6 for MIC verification. Skip the test if unavailable. Change-Id: I0b859c0ecf135182a6249a67b9b5ea9e34ad92b6 Reviewed-on: https://code.wireshark.org/review/27614 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
parent
438c1066d5
commit
177ea9e75a
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue