summaryrefslogtreecommitdiff
path: root/src/leap/soledad
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2012-12-24 11:42:13 -0200
committerdrebs <drebs@leap.se>2012-12-24 11:42:13 -0200
commit2889b05a7c540f2370e6a524517dff0994ddbe15 (patch)
tree29a66ba94b2d03830f1c80c80b3e5400b59e5eb7 /src/leap/soledad
parentba97ee77ddeb101834a25cbb8d48aaa5edc26b93 (diff)
Add send_keys to GPGWrapper
Diffstat (limited to 'src/leap/soledad')
-rw-r--r--src/leap/soledad/util.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/leap/soledad/util.py b/src/leap/soledad/util.py
index 84ec85f1..67d950a5 100644
--- a/src/leap/soledad/util.py
+++ b/src/leap/soledad/util.py
@@ -40,12 +40,19 @@ class GPGWrapper(gnupg.GPG):
always_trust=always_trust,
passphrase=passphrase)
- def send_keys(self, keys, keyserver):
+ def send_keys(self, keyserver, *keyids):
"""
Send keys to a keyserver.
"""
- pass
-
+ result = self.result_map['list'](self)
+ logger.debug('send_keys: %r', keyids)
+ data = _make_binary_stream("", self.encoding)
+ args = ['--keyserver', keyserver, '--send-keys']
+ args.extend(keyids)
+ self._handle_io(args, data, result, binary=True)
+ logger.debug('send_keys result: %r', result.__dict__)
+ data.close()
+ return result
#----------------------------------------------------------------------------