mirror of https://github.com/secdev/scapy.git
Fix Cryptography import (2.1+)
This commit is contained in:
parent
b715f1be47
commit
2eb0979c5d
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue