diff options
author | Werner Koch <[email protected]> | 2023-09-04 14:34:55 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-09-04 14:35:19 +0000 |
commit | 1be7882344c5b3eae35539f6c3f490df197574bf (patch) | |
tree | 782259db4ec603329ee4ba1fd19f0cd0db280835 /g10/keylist.c | |
parent | agent: Fix timer round-up check when inserting an entry into cache. (diff) | |
download | gnupg-1be7882344c5b3eae35539f6c3f490df197574bf.tar.gz gnupg-1be7882344c5b3eae35539f6c3f490df197574bf.zip |
gpg: Add option --with-v5-fingerprint
* g10/gpg.c (oWithV5Fingerprint): New.
(opts): Add new option.
(main): Set option.
* g10/options.h (opt): Add with_v5_fingerprint.
* g10/keyid.c (hash_public_key): Factor out to ...
(do_hash_public_key): this. Add new arg to foce v5 style hashing.
(v5_fingerprint_from_pk): New.
(v5hexfingerprint): New.
* g10/keylist.c (print_fingerprint): Print v5 fingerprint for v4 keys
if the option is set.
--
GnuPG-bug-id: 6705
Diffstat (limited to 'g10/keylist.c')
-rw-r--r-- | g10/keylist.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/keylist.c b/g10/keylist.c index 8b7c597cb..d0ebfc86f 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -2413,6 +2413,12 @@ print_fingerprint (ctrl_t ctrl, estream_t override_fp, if (with_colons && !mode) { es_fprintf (fp, "fpr:::::::::%s:", hexfpr); + if (opt.with_v5_fingerprint && pk->version == 4) + { + char *v5fpr = v5hexfingerprint (pk, NULL, 0); + es_fprintf (fp, "\nfp2:::::::::%s:", v5fpr); + xfree (v5fpr); + } } else if (compact && !opt.fingerprint && !opt.with_fingerprint) { |