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 <j@w1.fi>
This commit is contained in:
parent
a44744d3bb
commit
e36a7c7940
2 changed files with 8 additions and 2 deletions
|
@ -6,7 +6,10 @@
|
||||||
|
|
||||||
from remotehost import remote_compatible
|
from remotehost import remote_compatible
|
||||||
import binascii
|
import binascii
|
||||||
from Crypto.Cipher import AES
|
try:
|
||||||
|
from Cryptodome.Cipher import AES
|
||||||
|
except ImportError:
|
||||||
|
from Crypto.Cipher import AES
|
||||||
import hashlib
|
import hashlib
|
||||||
import hmac
|
import hmac
|
||||||
import logging
|
import logging
|
||||||
|
|
|
@ -8,7 +8,10 @@ from remotehost import remote_compatible
|
||||||
from tshark import run_tshark
|
from tshark import run_tshark
|
||||||
import base64
|
import base64
|
||||||
import binascii
|
import binascii
|
||||||
from Crypto.Cipher import AES
|
try:
|
||||||
|
from Cryptodome.Cipher import AES
|
||||||
|
except ImportError:
|
||||||
|
from Crypto.Cipher import AES
|
||||||
import hashlib
|
import hashlib
|
||||||
import hmac
|
import hmac
|
||||||
import os
|
import os
|
||||||
|
|
Loading…
Add table
Reference in a new issue