Add list-sigs implementation

testing/mmn/mktime_takes_localtime_not_gmtime
Isis Lovecruft 2013-05-22 17:05:17 +00:00
parent 60d6f676e5
commit 9437604c71
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
2 changed files with 17 additions and 2 deletions

View File

@ -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 + " ")

View File

@ -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