summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/fetch.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-08-21 14:55:24 -0300
committerTomás Touceda <chiiph@leap.se>2013-08-21 14:55:24 -0300
commit96be9573319456869c76de59b59e309a75fd15a6 (patch)
treea13d2d75771e2e45ee07a94cf39c43083db20cbb /src/leap/mail/imap/fetch.py
parent35bdd37d15732af2cf59636ecf6970f147fd3747 (diff)
parent410908917841bc2decbd4d00e04f75e2e6f1b88d (diff)
Merge remote-tracking branch 'drebs/feature/3487-split-soledad-into-common-client-and-server' into develop
Conflicts: src/leap/mail/imap/fetch.py src/leap/mail/imap/server.py
Diffstat (limited to 'src/leap/mail/imap/fetch.py')
-rw-r--r--src/leap/mail/imap/fetch.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/leap/mail/imap/fetch.py b/src/leap/mail/imap/fetch.py
index 3b15c6a..802ce26 100644
--- a/src/leap/mail/imap/fetch.py
+++ b/src/leap/mail/imap/fetch.py
@@ -29,7 +29,8 @@ from twisted.internet.threads import deferToThread
from leap.common import events as leap_events
from leap.common.check import leap_assert, leap_assert_type
-from leap.soledad import Soledad
+from leap.soledad.client import Soledad
+from leap.soledad.common.crypto import ENC_SCHEME_KEY, ENC_JSON_KEY
from leap.common.events.events_pb2 import IMAP_FETCHED_INCOMING
from leap.common.events.events_pb2 import IMAP_MSG_PROCESSING
@@ -47,9 +48,6 @@ class LeapIncomingMail(object):
Fetches mail from the incoming queue.
"""
- ENC_SCHEME_KEY = "_enc_scheme"
- ENC_JSON_KEY = "_enc_json"
-
RECENT_FLAG = "\\Recent"
INCOMING_KEY = "incoming"
@@ -159,11 +157,11 @@ class LeapIncomingMail(object):
leap_events.signal(
IMAP_MSG_PROCESSING, str(index), str(num_mails))
keys = doc.content.keys()
- if self.ENC_SCHEME_KEY in keys and self.ENC_JSON_KEY in keys:
+ if ENC_SCHEME_KEY in keys and ENC_JSON_KEY in keys:
# XXX should check for _enc_scheme == "pubkey" || "none"
# that is what incoming mail uses.
- encdata = doc.content[self.ENC_JSON_KEY]
+ encdata = doc.content[ENC_JSON_KEY]
defer.Deferred(self._decrypt_msg(doc, encdata))
else:
logger.debug('This does not look like a proper msg.')