]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Support pycryptodome
authorJouni Malinen <j@w1.fi>
Sun, 22 May 2022 08:03:39 +0000 (11:03 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 22 May 2022 08:08:59 +0000 (11:08 +0300)
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 <j@w1.fi>
tests/hwsim/test_ap_psk.py
tests/hwsim/test_ap_wps.py

index e9c7d5adc7ca8f804c694dc1ad5cd3ea1890742a..6901cae74a9fe29843cbcd2a3fa94c258936ee47 100644 (file)
@@ -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
index e01c73a1098dde28df601a3c5a28ae7cc96eca62..b397285f3190ecd866b4f33c5bdb38c07cb0724a 100644 (file)
@@ -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