diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-09-12 12:39:33 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-09-12 12:39:33 -0300 |
commit | a7a7f3917e74911ef0cbe0ac8bbeb865b97b3241 (patch) | |
tree | ded2a70d93ab0ff31c5f2c222c054cfcfb1c38f9 /src | |
parent | ca997dd2f931bd54e00f32c17fe4f8504413c955 (diff) |
Add errdecr key to each mail Soledad Document
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/mx/mail_receiver.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/leap/mx/mail_receiver.py b/src/leap/mx/mail_receiver.py index 86ba914..dd76f08 100644 --- a/src/leap/mx/mail_receiver.py +++ b/src/leap/mx/mail_receiver.py @@ -133,6 +133,7 @@ class MailReceiver(Service): """ INCOMING_KEY = 'incoming' + ERROR_DECRYPTING_KEY = "errdecr" def __init__(self, mail_couch_url, users_cdb, directories, bounce_from, bounce_subject): @@ -212,6 +213,7 @@ class MailReceiver(Service): if pubkey is None or len(pubkey) == 0: doc.content = { self.INCOMING_KEY: True, + self.ERROR_DECRYPTING_KEY: False, ENC_SCHEME_KEY: EncryptionSchemes.NONE, ENC_JSON_KEY: json.dumps(data, ensure_ascii=False) @@ -238,6 +240,7 @@ class MailReceiver(Service): data = {'incoming': True, 'content': message.as_string()} doc.content = { self.INCOMING_KEY: True, + self.ERROR_DECRYPTING_KEY: False, ENC_SCHEME_KEY: EncryptionSchemes.PUBKEY, ENC_JSON_KEY: str(gpg.encrypt( json.dumps(data, ensure_ascii=False), |