diff options
author | Ruben Pollan <meskio@sindominio.net> | 2016-09-27 15:48:29 -0500 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2016-09-27 21:40:28 -0500 |
commit | 0a0bdc9abbca1d07c1af781567e3a51c529c0447 (patch) | |
tree | 883b70f8ebc5825fe1cad7a865d5ab0f0845149d /src/leap/bitmask/core/dispatcher.py | |
parent | 125c711cd5b6faa4e6d62d18dde61dac90471f39 (diff) |
[feat] Fetch smtp cert automatically if missing
It's missing dealing with expired certs.
I remove get_smtp_certificate core command.
- Closes: #8486
Diffstat (limited to 'src/leap/bitmask/core/dispatcher.py')
-rw-r--r-- | src/leap/bitmask/core/dispatcher.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py index 2950896..4c885ce 100644 --- a/src/leap/bitmask/core/dispatcher.py +++ b/src/leap/bitmask/core/dispatcher.py @@ -182,31 +182,6 @@ class MailCmd(SubCommand): d = mail.get_token() return d - @register_method('dict') - def do_GET_SMTP_CERTIFICATE(self, mail, *parts, **kw): - # TODO move to mail service - # TODO should ask for confirmation? like --force or something, - # if we already have a valid one. or better just refuse if cert - # exists. - # TODO how should we pass the userid?? - # - Keep an 'active' user in bonafide (last authenticated) - # (doing it now) - # - Get active user from Mail Service (maybe preferred?) - # - Have a command/method to set 'active' user. - - @defer.inlineCallbacks - def save_cert(cert_data): - userid, cert_str = cert_data - cert_path = yield mail.do_get_smtp_cert_path(userid) - with open(cert_path, 'w') as outf: - outf.write(cert_str) - defer.returnValue('certificate saved to %s' % cert_path) - - bonafide = kw['bonafide'] - d = bonafide.do_get_smtp_cert() - d.addCallback(save_cert) - return d - class WebUICmd(SubCommand): |