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:
Jouni Malinen 2022-05-22 11:03:39 +03:00
parent a44744d3bb
commit e36a7c7940
2 changed files with 8 additions and 2 deletions

View 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

View 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