From ed5c1b0b8a4790c4fb36a3129387f7c2ef5db302 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 10 Aug 2016 19:51:54 +0200 Subject: 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 --- g10/parse-packet.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'g10/parse-packet.c') 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); -- cgit v1.2.3