diff options
-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), |