diff options
author | Kali Kaneko <kali@leap.se> | 2017-05-31 12:17:01 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-05-31 16:15:43 +0200 |
commit | 2be50c902873b0dd779cc7b28eea9e423accbc29 (patch) | |
tree | 590ff07706b019de98ef7020781394c3f36fcf41 /client/src/leap/soledad | |
parent | 773b96796dfaa2e43c9d16d1a1cdbd609a520056 (diff) |
[bug] fix deprecated multibackend call
Diffstat (limited to 'client/src/leap/soledad')
-rw-r--r-- | client/src/leap/soledad/client/_crypto.py | 6 | ||||
-rw-r--r-- | client/src/leap/soledad/client/crypto.py | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/client/src/leap/soledad/client/_crypto.py b/client/src/leap/soledad/client/_crypto.py index e66cc600..8cedf52e 100644 --- a/client/src/leap/soledad/client/_crypto.py +++ b/client/src/leap/soledad/client/_crypto.py @@ -85,9 +85,7 @@ from twisted.web.client import FileBodyProducer from leap.soledad.common import soledad_assert from cryptography.exceptions import InvalidTag from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes -from cryptography.hazmat.backends.multibackend import MultiBackend -from cryptography.hazmat.backends.openssl.backend \ - import Backend as OpenSSLBackend +from cryptography.hazmat.backends import default_backend from zope.interface import implementer @@ -95,7 +93,7 @@ from zope.interface import implementer SECRET_LENGTH = 64 SEPARATOR = ' ' # Anything that doesn't belong to base64 encoding -CRYPTO_BACKEND = MultiBackend([OpenSSLBackend()]) +CRYPTO_BACKEND = default_backend() PACMAN = struct.Struct('2sbbQ16s255p255pQ') LEGACY_PACMAN = struct.Struct('2sbbQ16s255p255p') diff --git a/client/src/leap/soledad/client/crypto.py b/client/src/leap/soledad/client/crypto.py index 4795846c..0f19c964 100644 --- a/client/src/leap/soledad/client/crypto.py +++ b/client/src/leap/soledad/client/crypto.py @@ -23,10 +23,8 @@ import hmac import hashlib import json +from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes -from cryptography.hazmat.backends.multibackend import MultiBackend -from cryptography.hazmat.backends.openssl.backend \ - import Backend as OpenSSLBackend from leap.soledad.common import soledad_assert from leap.soledad.common import soledad_assert_type @@ -42,7 +40,7 @@ warnings.warn("'soledad.client.crypto' MODULE DEPRECATED", MAC_KEY_LENGTH = 64 -crypto_backend = MultiBackend([OpenSSLBackend()]) +crypto_backend = default_backend() def encrypt_sym(data, key): |