Hello! We are running our annual fundraising. Please consider making a donation if you value this freely available service or want to support people around the world working towards liberatory social change. https://riseup.net/donate.

Unverified Commit 2be50c90 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[bug] fix deprecated multibackend call

parent 773b9679
......@@ -32,7 +32,6 @@ trove_classifiers = (
"Environment :: Console",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Database :: Front-Ends",
"Topic :: Software Development :: Libraries :: Python Modules"
......@@ -113,7 +112,7 @@ install_requires = [
'leap.common', 'leap.soledad.common', 'treq']
# needed until kali merges the py3 fork back into the main pysqlcipher repo
if sys.version_info >= (3, 0):
if sys.version_info.major >= 3:
install_requires += ['pysqlcipher3']
else:
install_requires += ['pysqlcipher']
......
......@@ -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')
......
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment