From 205a63808addb6269d3e98c5a60ab188afe8a9a5 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 28 Mar 2017 19:55:48 -0300 Subject: [bug] use soledad_assert instead of assert --- client/src/leap/soledad/client/_crypto.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/src/leap') diff --git a/client/src/leap/soledad/client/_crypto.py b/client/src/leap/soledad/client/_crypto.py index 85dbb138..700449bb 100644 --- a/client/src/leap/soledad/client/_crypto.py +++ b/client/src/leap/soledad/client/_crypto.py @@ -82,6 +82,7 @@ from twisted.internet import defer from twisted.internet import interfaces 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 @@ -347,8 +348,8 @@ class BlobDecryptor(object): self.tag = None preamble, iv = self._consume_preamble() - assert preamble - assert iv + soledad_assert(preamble) + soledad_assert(iv) self._aes = AESWriter(sym_key, iv, self.result, tag=tag or self.tag) self._aes.authenticate(preamble) -- cgit v1.2.3