mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
agent: New option --need-attr for KEYINFO.
* agent/command.c (do_one_keyinfo): New arg need_Attr. (cmd_keyinfo): New option --need-attr. * agent/findkey.c (public_key_from_file): Use nvc_get_boolean. -- This option makes it easier to list keys suitable only for certain purposes. The second patch makes if compliant to the description in keyformat.txt
This commit is contained in:
parent
40f0fcfaa4
commit
989eae648c
2 changed files with 73 additions and 17 deletions
|
@ -1459,16 +1459,12 @@ public_key_from_file (ctrl_t ctrl, const unsigned char *grip,
|
|||
if (for_ssh)
|
||||
{
|
||||
/* Use-for-ssh: yes */
|
||||
const char *p;
|
||||
int is_ssh = 0;
|
||||
|
||||
if (keymeta == NULL)
|
||||
return gpg_error (GPG_ERR_WRONG_KEY_USAGE);
|
||||
|
||||
if ((p = nvc_get_string (keymeta, "Use-for-ssh:"))
|
||||
&& !strcmp (p, "yes"))
|
||||
is_ssh = 1;
|
||||
|
||||
is_ssh = nvc_get_boolean (keymeta, "Use-for-ssh:");
|
||||
nvc_release (keymeta);
|
||||
keymeta = NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue