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.

Verified Commit 123f9ead authored by Victor's avatar Victor
Browse files

[style] fix typos and add comments from review

parent 2fbf7428
Pipeline #7695 passed with stage
in 83 minutes and 34 seconds
......@@ -105,9 +105,11 @@ class DecrypterBuffer(object):
real_size = self.decrypter.decrypted_content_size
return self.decrypter.endStream(), real_size
elif hasattr(self, 'raw_data'):
# Externally encrypted blob, see Incoming API specification
# blob was not symmetrically encrypted, see _make_decryptor() above
return self.raw_data, self.raw_data.tell()
# the only case that can lead here is if the preamble was not
# completelly consumed by the pipe.
msg = "Incomplete Blob: %s" % self.doc_info.doc_id
raise RetriableTransferError(msg)
......@@ -88,7 +88,7 @@ class DecrypterBufferCase(unittest.TestCase):
def test_incomplete_blob_decryption(self):
# SCENARIO: Transport failed and close was called with incomplete data
# CASE 1: Incomplete blob of known encryption type
# CASE 2: Incomplete blob of known encryption type
# OUTCOME: InvalidBlob. It's safer to assume the tag is invalid
encrypted = (yield self.blob.encrypt()).getvalue()
encrypted = encrypted[:-20] # 20 bytes missing
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