Skip to content
Snippets Groups Projects
Commit ef9c5190 authored by Pierre LALET's avatar Pierre LALET
Browse files

Fix ipsec layer to work w/ pycrypto lacking some AES modes

parent 064203bb
No related branches found
No related tags found
No related merge requests found
......@@ -370,16 +370,18 @@ if AES:
block_size=1,
iv_size=8,
key_size=(16 + 4, 24 + 4, 32 + 4))
CRYPT_ALGOS['AES-GCM'] = CryptAlgo('AES-GCM',
cipher=AES,
mode=AES.MODE_GCM,
iv_size=8,
key_size=(16 + 4, 24 + 4, 32 + 4))
CRYPT_ALGOS['AES-CCM'] = CryptAlgo('AES-CCM',
cipher=AES,
mode=AES.MODE_CCM,
iv_size=8,
key_size=(16 + 4, 24 + 4, 32 + 4))
if hasattr(AES, "MODE_GCM"):
CRYPT_ALGOS['AES-GCM'] = CryptAlgo('AES-GCM',
cipher=AES,
mode=AES.MODE_GCM,
iv_size=8,
key_size=(16 + 4, 24 + 4, 32 + 4))
if hasattr(AES, "MODE_CCM"):
CRYPT_ALGOS['AES-CCM'] = CryptAlgo('AES-CCM',
cipher=AES,
mode=AES.MODE_CCM,
iv_size=8,
key_size=(16 + 4, 24 + 4, 32 + 4))
if DES:
CRYPT_ALGOS['DES'] = CryptAlgo('DES',
cipher=DES,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment