From df858f17066dbebf3892efe85414b57951767ac5 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Sun, 19 Feb 2017 23:30:04 +0100 Subject: [feature] add attribute to keep blob crypto --- client/src/leap/soledad/client/_crypto.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client') diff --git a/client/src/leap/soledad/client/_crypto.py b/client/src/leap/soledad/client/_crypto.py index b9f9030f..c57f0921 100644 --- a/client/src/leap/soledad/client/_crypto.py +++ b/client/src/leap/soledad/client/_crypto.py @@ -356,6 +356,7 @@ class BlobDecryptor(object): self.fd = ciphertext_fd self.armor = armor self._producer = None + self.size = None preamble, iv = self._consume_preamble() assert preamble @@ -395,6 +396,7 @@ class BlobDecryptor(object): elif len(preamble) == PACMAN.size: unpacked_data = PACMAN.unpack(preamble) magic, sch, meth, ts, iv, doc_id, rev, doc_size = unpacked_data + self.size = doc_size else: raise InvalidBlob("Unexpected preamble size %d", len(preamble)) except struct.error as e: -- cgit v1.2.3