gpg: Cache a once computed fingerprint in PKT_public_key.
authorWerner Koch <wk@gnupg.org>
Fri, 12 Apr 2019 09:11:09 +0000 (11:11 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 12 Apr 2019 09:11:09 +0000 (11:11 +0200)
commit60f384592144de53c9a5f5e11d7f73ce863aa94f
treed35b772046b32ce70680e6e9bc903d9d886d0176
parent1b1f649deaeba963ed7240b27f848004db0b051f
gpg: Cache a once computed fingerprint in PKT_public_key.

* g10/packet.h (PKT_public_key): Add fields fpr and fprlen.
* g10/keyid.c (do_fingerprint_md): Remove.
(compute_fingerprint): New.
(keyid_from_pk): Simplify.
(fingerprint_from_pk): Simplify.
(hexfingerprint): Avoid using extra array.
--

This is similar to what we are doing with the keyid for a long time.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/keyid.c
g10/packet.h