summaryrefslogtreecommitdiff
path: root/service/pixelated/adapter/mail.py
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated/adapter/mail.py')
-rw-r--r--service/pixelated/adapter/mail.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/service/pixelated/adapter/mail.py b/service/pixelated/adapter/mail.py
index 25e86cf3..946b921d 100644
--- a/service/pixelated/adapter/mail.py
+++ b/service/pixelated/adapter/mail.py
@@ -254,6 +254,8 @@ class PixelatedMail(Mail):
casing = {"imprints": [], "locks": []}
if self.signed:
casing["imprints"].append({"state": "valid", "seal": {"validity": "valid"}})
+ elif self.signed is None:
+ casing["imprints"].append({"state": "no_signature_information"})
if self.encrypted:
casing["locks"].append({"state": "valid"})
@@ -322,7 +324,11 @@ class PixelatedMail(Mail):
@property
def signed(self):
- return self.hdoc.content["headers"].get("X-Leap-Signature", "").startswith("valid")
+ signature = self.hdoc.content["headers"].get("X-Leap-Signature", None)
+ if signature is None:
+ return None
+ else:
+ return signature.startswith("valid")
@property
def encrypted(self):