Fix Cryptography import (2.1+)

This commit is contained in:
gpotter2 2017-10-12 18:50:45 +02:00
parent b715f1be47
commit 2eb0979c5d
2 changed files with 1 additions and 3 deletions

View File

@ -22,7 +22,6 @@ from scapy.layers.inet6 import IPv6
if conf.crypto_valid:
from cryptography.exceptions import InvalidTag
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import interfaces
from cryptography.hazmat.primitives.ciphers import (
Cipher,
algorithms,

View File

@ -160,7 +160,6 @@ class _ESPPlain(Packet):
if conf.crypto_valid:
from cryptography.exceptions import InvalidTag
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import interfaces
from cryptography.hazmat.primitives.ciphers import (
Cipher,
algorithms,
@ -169,7 +168,7 @@ if conf.crypto_valid:
else:
log_loading.info("Can't import python-cryptography v1.7+. "
"Disabled IPsec encryption/authentication.")
InvalidTag = default_backend = interfaces = None
InvalidTag = default_backend = None
Cipher = algorithms = modes = None
#------------------------------------------------------------------------------