summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2015-01-26 13:04:54 -0600
committerKali Kaneko <kali@leap.se>2015-02-11 14:05:44 -0400
commit3cd1e6ace64fad041873cb08b74789f9b78c50c9 (patch)
treef4d1e1459accc8ceb39e32d939e1431ed4c23518 /src/leap
parent078970756ef995b73e39cd00ba4cc27d42913750 (diff)
If not signature don't fail
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/mail/incoming/service.py2
-rw-r--r--src/leap/mail/incoming/tests/test_incoming_mail.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/mail/incoming/service.py b/src/leap/mail/incoming/service.py
index 0b2f7c2..23c216c 100644
--- a/src/leap/mail/incoming/service.py
+++ b/src/leap/mail/incoming/service.py
@@ -435,7 +435,7 @@ class IncomingMail(Service):
def add_leap_header(ret):
decrmsg, signkey = ret
- if (senderAddress is None or
+ if (senderAddress is None or signkey is None or
isinstance(signkey, keymanager_errors.KeyNotFound)):
decrmsg.add_header(
self.LEAP_SIGNATURE_HEADER,
diff --git a/src/leap/mail/incoming/tests/test_incoming_mail.py b/src/leap/mail/incoming/tests/test_incoming_mail.py
index 0745ee0..f8652b3 100644
--- a/src/leap/mail/incoming/tests/test_incoming_mail.py
+++ b/src/leap/mail/incoming/tests/test_incoming_mail.py
@@ -46,6 +46,8 @@ from leap.soledad.common.crypto import (
ENC_SCHEME_KEY,
)
+# TODO: add some tests for encrypted, unencrypted, signed and unsgined messages
+
class IncomingMailTestCase(TestCaseWithKeyManager):
"""