diff options
author | Werner Koch <[email protected]> | 2016-08-10 17:51:54 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-08-10 17:53:53 +0000 |
commit | ed5c1b0b8a4790c4fb36a3129387f7c2ef5db302 (patch) | |
tree | a6bf5425ab66a0d20467a7dfa4e09b1e44fc1cc4 /g10/parse-packet.c | |
parent | common: New function try_make_printable_string. (diff) | |
download | gnupg-ed5c1b0b8a4790c4fb36a3129387f7c2ef5db302.tar.gz gnupg-ed5c1b0b8a4790c4fb36a3129387f7c2ef5db302.zip |
gpg: Print the signer's UID during verification.
* g10/parse-packet.c (parse_signature): Sanitize the value stored in
SIGNERS_UID.
* g10/mainproc.c (issuer_fpr_string): New.
(check_sig_and_print): Print the signers' UID. Print the issuer
fingerprint in --rfc4880bis mode.
--
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | g10/parse-packet.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c index ec8a64121..9a733b521 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -1936,15 +1936,12 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen, p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_SIGNERS_UID, &len); if (p && len) { - sig->signers_uid = xtrymalloc (len+1); + sig->signers_uid = try_make_printable_string (p, len, 0); 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); |