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:
parent
da7f9470ea
commit
dba5f8d52a
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user