diff options
author | Kali Kaneko <kali@leap.se> | 2017-02-19 23:30:04 +0100 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-04-04 18:27:31 +0200 |
commit | df858f17066dbebf3892efe85414b57951767ac5 (patch) | |
tree | a271cd1a39a630ebec21cba0721af9ec58c51e3b | |
parent | e8fbdbb58693e0901032b47d9b2fa4a8ace1d8af (diff) |
[feature] add attribute to keep blob crypto
-rw-r--r-- | client/src/leap/soledad/client/_crypto.py | 2 |
1 files changed, 2 insertions, 0 deletions
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: |