1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

gpg: Try Signer's User ID sub-packet with --auto-key-retrieve.

* g10/packet.h (PKT_signature): Add field 'signers_uid'.
* g10/parse-packet.c (parse_signature): Set this field.
* g10/free-packet.c (free_seckey_enc): Free field.
(copy_signature): Copy field.
* g10/mainproc.c (akl_has_wkd_method): New.
(check_sig_and_print): Extend NEWSIG status.  If WKD is enabled try to
locate a missing key via the signature's Signer's User ID sub-packet.
Do this right before trying a keyserver lookup.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-06-13 10:40:34 +02:00
parent 18b03e756b
commit 08c82b1b55
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
5 changed files with 89 additions and 15 deletions

View file

@ -1915,6 +1915,20 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen,
if (p)
sig->flags.pref_ks = 1;
p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_SIGNERS_UID, &len);
if (p && len)
{
sig->signers_uid = xtrymalloc (len+1);
if (!sig->signers_uid)
{
rc = gpg_error_from_syserror ();
goto leave;
}
/* Note that we don't care about binary zeroes in the value. */
memcpy (sig->signers_uid, p, len);
sig->signers_uid[len] = 0;
}
p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_NOTATION, NULL);
if (p)
sig->flags.notation = 1;