From: Jouni Malinen Date: Sun, 22 May 2022 08:03:39 +0000 (+0300) Subject: tests: Support pycryptodome X-Git-Tag: hostap_2_11~1898 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e36a7c7940f89ab544ca827be0924d2b23b3e359;p=thirdparty%2Fhostap.git tests: Support pycryptodome This is a drop-in replacement for pycrypto and the only version that is now available in Ubuntu 22.04. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index e9c7d5adc..6901cae74 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -6,7 +6,10 @@ from remotehost import remote_compatible import binascii -from Crypto.Cipher import AES +try: + from Cryptodome.Cipher import AES +except ImportError: + from Crypto.Cipher import AES import hashlib import hmac import logging diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index e01c73a10..b397285f3 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -8,7 +8,10 @@ from remotehost import remote_compatible from tshark import run_tshark import base64 import binascii -from Crypto.Cipher import AES +try: + from Cryptodome.Cipher import AES +except ImportError: + from Crypto.Cipher import AES import hashlib import hmac import os