forked from osmocom/wireshark
test: Use integer tuple to check Gcrypt version
Converting Gcrypt version to float before checking against 1.6 does not work when Gcrypt version is 1.10 and above.
This commit is contained in:
parent
9d11321385
commit
eabf92859e
|
@ -172,15 +172,16 @@ def features(cmd_tshark, make_env):
|
|||
except subprocess.CalledProcessError as ex:
|
||||
print('Failed to detect tshark features: %s' % (ex,))
|
||||
tshark_v = ''
|
||||
gcry_m = re.search(r'with +Gcrypt +([0-9]+\.[0-9]+)', tshark_v)
|
||||
gcry_m = re.search(r'with +Gcrypt +([0-9]+)\.([0-9]+)', tshark_v)
|
||||
gcry_ver = (int(gcry_m.group(1)),int(gcry_m.group(2)))
|
||||
return types.SimpleNamespace(
|
||||
have_x64='Compiled (64-bit)' in tshark_v,
|
||||
have_lua='with Lua' in tshark_v,
|
||||
have_nghttp2='with nghttp2' in tshark_v,
|
||||
have_kerberos='with MIT Kerberos' in tshark_v or 'with Heimdal Kerberos' in 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,
|
||||
have_libgcrypt18=gcry_m and float(gcry_m.group(1)) >= 1.8,
|
||||
have_libgcrypt16=gcry_m and gcry_ver >= (1,6),
|
||||
have_libgcrypt17=gcry_m and gcry_ver >= (1,7),
|
||||
have_libgcrypt18=gcry_m and gcry_ver >= (1,8),
|
||||
have_gnutls='with GnuTLS' in tshark_v,
|
||||
have_pkcs11='and PKCS #11 support' in tshark_v,
|
||||
have_brotli='with brotli' in tshark_v,
|
||||
|
|
Loading…
Reference in New Issue