From 948f12a655435968f2754209f8031516433255f4 Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 24 Dec 2012 12:46:37 -0200 Subject: Add send_keys to GPGWrapper --- src/leap/soledad/util.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/leap/soledad') diff --git a/src/leap/soledad/util.py b/src/leap/soledad/util.py index 5d1e263e..af38cd76 100644 --- a/src/leap/soledad/util.py +++ b/src/leap/soledad/util.py @@ -38,6 +38,20 @@ class GPGWrapper(gnupg.GPG): always_trust=always_trust, passphrase=passphrase) + def send_keys(self, keyserver, *keyids): + """ + Send keys to a keyserver + """ + 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 + #---------------------------------------------------------------------------- # u1db Transaction and Sync logs. -- cgit v1.2.3