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