summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/core/dispatcher.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2016-06-30 20:38:36 +0200
committerRuben Pollan <meskio@sindominio.net>2016-07-03 16:04:41 +0200
commit24203c3752feecb9c0be74b93bb1832ccb34d3a3 (patch)
treece40b643a29ce6559372b0d63216df22a53bdb81 /src/leap/bitmask/core/dispatcher.py
parent593803edd2efe4b45f201b8d423b5f4af7d4d6d7 (diff)
[feat] add keys from the bitmask cli
- Resolves: #7965
Diffstat (limited to 'src/leap/bitmask/core/dispatcher.py')
-rw-r--r--src/leap/bitmask/core/dispatcher.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py
index a50a6b62..9e2b96de 100644
--- a/src/leap/bitmask/core/dispatcher.py
+++ b/src/leap/bitmask/core/dispatcher.py
@@ -179,6 +179,19 @@ class KeysCmd(SubCommand):
d.addCallback(service.do_export, address, private)
return d
+ @register_method('dict')
+ def do_ADD(self, service, *parts, **kw):
+ if len(parts) < 5:
+ return defer.fail("An email address is needed")
+ address = parts[2]
+ validation = parts[3]
+ rawkey = parts[4]
+
+ bonafide = kw['bonafide']
+ d = bonafide.do_get_active_user()
+ d.addCallback(service.do_add, address, rawkey, validation)
+ return d
+
@register_method('str')
def do_DELETE(self, service, *parts, **kw):
if len(parts) < 3: