When listing keys, if a key ring has been specified, list the keys in

that key ring.  If no key ring has been specified, list the keys in
the default public key ring, rather than dying with a usage message.
Matches gpg behaviour, and stops openpgp violating the POLA.
This commit is contained in:
agc 2009-01-22 00:59:12 +00:00
parent da7f9470ea
commit dba5f8d52a
1 changed files with 1 additions and 8 deletions

View File

@ -333,14 +333,7 @@ int main(int argc, char **argv)
switch(cmd)
{
case LIST_KEYS:
if (!got_keyring)
{
print_usage(usage_list_keys,pname);
exit(EXIT_ERROR);
}
ops_keyring_list(myring);
// ops_keyring_free(&kering);
ops_keyring_list((got_keyring) ? myring : pubring);
break;
//case LIST_PACKETS: