Add list-sigs implementation
parent
60d6f676e5
commit
9437604c71
|
@ -337,6 +337,7 @@ def _is_allowed(input):
|
||||||
'--armour',
|
'--armour',
|
||||||
'--clearsign',
|
'--clearsign',
|
||||||
'--detach-sign',
|
'--detach-sign',
|
||||||
|
'--list-sigs',
|
||||||
'--sign',
|
'--sign',
|
||||||
'--verify',
|
'--verify',
|
||||||
## i/o and files
|
## i/o and files
|
||||||
|
@ -499,7 +500,7 @@ def _sanitise(*args):
|
||||||
log.debug("%s not file: %s" % (flag, val))
|
log.debug("%s not file: %s" % (flag, val))
|
||||||
elif flag in ['--default-key', '--recipient',
|
elif flag in ['--default-key', '--recipient',
|
||||||
'--export', '--export-secret-keys',
|
'--export', '--export-secret-keys',
|
||||||
'--delete-keys',
|
'--delete-keys', '--list-sigs',
|
||||||
'--export-secret-subkeys',]:
|
'--export-secret-subkeys',]:
|
||||||
if _is_hex(val):
|
if _is_hex(val):
|
||||||
safe_option += (val + " ")
|
safe_option += (val + " ")
|
||||||
|
|
16
src/gnupg.py
16
src/gnupg.py
|
@ -1038,7 +1038,21 @@ use_agent: %s
|
||||||
:returns: A dictionary whose keys are the original keyid parameters,
|
:returns: A dictionary whose keys are the original keyid parameters,
|
||||||
and whose values are lists of signatures.
|
and whose values are lists of signatures.
|
||||||
"""
|
"""
|
||||||
raise NotImplemented("Functionality for '--list-sigs' not implemented.")
|
if len(keyids) > self._batch_limit:
|
||||||
|
raise ValueError(
|
||||||
|
"List signatures is limited to %d keyids simultaneously"
|
||||||
|
% self._batch_limit)
|
||||||
|
|
||||||
|
args = ["--with-colons", "--fixed-list-mode", "--list-sigs"]
|
||||||
|
|
||||||
|
for key in keyids:
|
||||||
|
args.append(key)
|
||||||
|
|
||||||
|
proc = self._open_subprocess(args)
|
||||||
|
|
||||||
|
result = self._result_map['list'](self)
|
||||||
|
self._collect_output(proc, result, stdin=p.stdin)
|
||||||
|
return result
|
||||||
|
|
||||||
def gen_key(self, input):
|
def gen_key(self, input):
|
||||||
"""Generate a GnuPG key through batch file key generation. See
|
"""Generate a GnuPG key through batch file key generation. See
|
||||||
|
|
Loading…
Reference in New Issue