Home GnuPG
Diffusion GnuPG 538853780641

agent: Allow the use of "Label:" in a key file.

Description

agent: Allow the use of "Label:" in a key file.

* agent/findkey.c (linefeed_to_percent0A): New.
(read_key_file): Add optional arg 'keymeta' and change all callers.
(agent_key_from_file): Prefer "Label:" over the comment for protected
keys.

If in the extended key format an item

Label: This is my key

is found, "This is my key" will be displayed instead of the comment
intially recorded in the s-expression. This is pretty useful for the
ssh keys because often there is only the original file name recorded
in the comment.

If no Label is found or it is empty the S-expression comment is used.

To show more than one line, the standard name-value syntax can be
used, for example:

Label: The Ssh key
<blank line>
<space>I registered on fencepost.
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on May 7 2019, 11:08 AM
Parents
rGb5985d0ca21c: common: New functions nvc_delete_named and nvc_get_string.
Branches
Unknown
Tags
Unknown