mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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
This commit is contained in:
parent
d90f1e5fa4
commit
1be7882344
6 changed files with 102 additions and 9 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue