diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-10-22 18:38:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-23 01:00:09 +0200 |
commit | 3daaaabe7ed22c17bff04d19c711be427bd2e225 (patch) | |
tree | a731b31651b54e0f23b079e10e8aeaf9b094aaf2 /pretty.c | |
parent | gpg-interface.c: use flags to determine key/signer info presence (diff) | |
download | git-3daaaabe7ed22c17bff04d19c711be427bd2e225.tar.xz git-3daaaabe7ed22c17bff04d19c711be427bd2e225.zip |
gpg-interface.c: support getting key fingerprint via %GF format
Support processing VALIDSIG status that provides additional information
for valid signatures. Use this information to propagate signing key
fingerprint and expose it via %GF pretty format. This format can be
used to build safer key verification systems that verify the key via
complete fingerprint rather than short/long identifier provided by %GK.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pretty.c')
-rw-r--r-- | pretty.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1256,6 +1256,10 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */ if (c->signature_check.key) strbuf_addstr(sb, c->signature_check.key); break; + case 'F': + if (c->signature_check.fingerprint) + strbuf_addstr(sb, c->signature_check.fingerprint); + break; default: return 0; } |