diff options
author | Kali Kaneko <kali@futeisha.org> | 2014-09-12 11:32:34 -0500 |
---|---|---|
committer | Kali Kaneko <kali@futeisha.org> | 2014-09-12 11:32:34 -0500 |
commit | fe8caf9507a5749e26712382c0a95aaa5f644ad3 (patch) | |
tree | ded2a70d93ab0ff31c5f2c222c054cfcfb1c38f9 | |
parent | ca997dd2f931bd54e00f32c17fe4f8504413c955 (diff) | |
parent | a7a7f3917e74911ef0cbe0ac8bbeb865b97b3241 (diff) |
Merge remote-tracking branch 'chiiph/feature/6072_error_decrypting_key' into develop
-rw-r--r-- | changes/feature_error_decrypting_key | 2 | ||||
-rw-r--r-- | src/leap/mx/mail_receiver.py | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/changes/feature_error_decrypting_key b/changes/feature_error_decrypting_key new file mode 100644 index 0000000..f0098a2 --- /dev/null +++ b/changes/feature_error_decrypting_key @@ -0,0 +1,2 @@ + o Add errdecr key defaulting to each mail Soledad Document. Closes + #6072.
\ No newline at end of file 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), |