diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-07-26 19:49:08 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-08-17 10:59:49 -0700 |
commit | 72f38d180ebba19b5479ded08f6df0acd7acd7d2 (patch) | |
tree | fd68aab893b62031972e3c096a1d90fd7cef855e | |
parent | cff9f149458c2e8742c7aa344984c3bf1d741747 (diff) |
db/utils: Don't attach invalid signature to unsigned but encrypted messages
The logic in the comment is faulty. There are perfectly legitimate
reasons to encrypt but not sign a message, some of them are fleshed out
in the previous commit.
-rw-r--r-- | alot/db/utils.py | 5 | ||||
-rw-r--r-- | tests/db/utils_test.py | 1 |
2 files changed, 0 insertions, 6 deletions
diff --git a/alot/db/utils.py b/alot/db/utils.py index 994e85b2..8f71f20a 100644 --- a/alot/db/utils.py +++ b/alot/db/utils.py @@ -203,11 +203,6 @@ def message_from_file(handle): for k in (X_SIGNATURE_VALID_HEADER, X_SIGNATURE_MESSAGE_HEADER): m[k] = n[k] - else: - # an encrypted message without signatures - # should arouse some suspicion, better warn - # the user - add_signature_headers(m, [], 'no signature found') else: # 'Combined method', the signatures are returned # by the decrypt_verify function. diff --git a/tests/db/utils_test.py b/tests/db/utils_test.py index 7c95f27d..b18bbd82 100644 --- a/tests/db/utils_test.py +++ b/tests/db/utils_test.py @@ -554,7 +554,6 @@ class TestMessageFromFile(TestCaseClassCleanup): # existence. self.assertIn('This is some text', [n.get_payload() for n in m.walk()]) - @unittest.expectedFailure def test_encrypted_unsigned_doesnt_add_signed_headers(self): """Since the message isn't signed, it shouldn't have headers saying that there is a signature. |