summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-02-17 20:40:35 -0400
committerKali Kaneko <kali@leap.se>2014-02-17 20:40:35 -0400
commit6f98424d41b38d5e56f54f312a6de871e3a82daa (patch)
tree636a3cbb30939881092e78041fae48bd4a227c76 /src/leap/mail/imap
parent32e3c5ddaa5df30a573762e273f3a12f7eb3c255 (diff)
parentc8b2163c8d8063f5e9a5cc7a2a721e933f002be0 (diff)
Merge remote-tracking branch 'ivan/bug/fix-keymanager-args' into develop
Diffstat (limited to 'src/leap/mail/imap')
-rw-r--r--src/leap/mail/imap/service/imap-server.tac33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/leap/mail/imap/service/imap-server.tac b/src/leap/mail/imap/service/imap-server.tac
index b65bb17..651f71b 100644
--- a/src/leap/mail/imap/service/imap-server.tac
+++ b/src/leap/mail/imap/service/imap-server.tac
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# imap-server.tac
+# imap-server.tac
# Copyright (C) 2013,2014 LEAP
#
# This program is free software: you can redistribute it and/or modify
@@ -97,8 +97,10 @@ print "[+] Running LEAP IMAP Service"
bmconf = os.environ.get("LEAP_MAIL_CONF", "")
if not bmconf:
- print "[-] Please set LEAP_MAIL_CONF environment variable pointing to your config."
- sys.exit(1)
+ print ("[-] Please set LEAP_MAIL_CONF environment variable "
+ "pointing to your config.")
+ sys.exit(1)
+
SECTION = "leap_mail"
cp = ConfigParser.ConfigParser()
cp.read(bmconf)
@@ -111,11 +113,11 @@ passwd = unicode(cp.get(SECTION, "passwd"))
port = 1984
if not userid or not uuid:
- print "[-] Config file missing userid or uuid field"
- sys.exit(1)
+ print "[-] Config file missing userid or uuid field"
+ sys.exit(1)
if not passwd:
- passwd = unicode(getpass.getpass("Soledad passphrase: "))
+ passwd = unicode(getpass.getpass("Soledad passphrase: "))
secrets = os.path.expanduser("~/.config/leap/soledad/%s.secret" % (uuid,))
@@ -129,16 +131,17 @@ tempdir = "/tmp/"
# Ad-hoc soledad/keymanager initialization.
-soledad = initialize_soledad(uuid, userid, passwd, secrets, localdb, gnupg_home, tempdir)
+soledad = initialize_soledad(uuid, userid, passwd, secrets,
+ localdb, gnupg_home, tempdir)
km_args = (userid, "https://localhost", soledad)
-km_kwargs = {
- "session_id": "",
- "ca_cert_path": "",
- "api_uri": "",
- "api_version": "",
- "uid": uuid,
- "gpgbinary": "/usr/bin/gpg"
-}
+km_kwargs = {
+ "token": "",
+ "ca_cert_path": "",
+ "api_uri": "",
+ "api_version": "",
+ "uid": uuid,
+ "gpgbinary": "/usr/bin/gpg"
+}
keymanager = KeyManager(*km_args, **km_kwargs)
##################################################