summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-03-06 16:55:54 -0300
committerVictor Shyba <victor.shyba@gmail.com>2015-03-06 16:58:09 -0300
commite4cb6b011ba877878e1c662a42fa3ba6e324a19f (patch)
treeae0731c78996b8248599399ff34909f710cf4af6 /service
parent747d41f408c4632bcaea568bd55f70d8f09e4c31 (diff)
for #288, adds encryption failure to casing
Diffstat (limited to 'service')
-rw-r--r--service/pixelated/adapter/model/mail.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/service/pixelated/adapter/model/mail.py b/service/pixelated/adapter/model/mail.py
index 951e6a21..c5c9e424 100644
--- a/service/pixelated/adapter/model/mail.py
+++ b/service/pixelated/adapter/model/mail.py
@@ -300,8 +300,10 @@ class PixelatedMail(Mail):
def security_casing(self):
casing = {"imprints": [], "locks": []}
casing["imprints"] = self.signature_information
- if self.encrypted:
+ if self.encrypted == "true":
casing["locks"] = [{"state": "valid"}]
+ elif self.encrypted == "fail":
+ casing["locks"] = [{"state": "failure"}]
return casing
@property
@@ -377,7 +379,7 @@ class PixelatedMail(Mail):
@property
def encrypted(self):
- return self.hdoc.content["headers"].get("X-Pixelated-encryption-status", "false") == "true"
+ return self.hdoc.content["headers"].get("X-Pixelated-encryption-status", "false")
@property
def bounced(self):