mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Prepare for a longer fingerprint
* g10/card-util.c (change_cafpr): Use MAX_FINGERPRINT_LEN. * g10/cipher.c (write_header): Use snprintf. * g10/gpg.h (MAX_FINGERPRINT_LEN): Change to 32. (MAX_FORMATTED_FINGERPRINT_LEN): Change to 59 * g10/keyid.c (format_hexfingerprint): Add v5 fingerprint format. * g10/tofu.c (get_policy): Use MAX_FINGERPRINT_LEN for the buffer but keep the raw length for now. -- Note that this patch only increases the size of the buffer and adds a new formatting for v5 fingerprints. Moe work is required to fix internal data structures like those in trustdb.gpg and the tofu tables. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
76c80021d4
commit
ecbbafb88d
8 changed files with 65 additions and 22 deletions
13
g10/gpg.h
13
g10/gpg.h
|
@ -38,14 +38,15 @@
|
|||
#define MAX_EXTERN_MPI_BITS 16384
|
||||
|
||||
/* The maximum length of a binary fingerprints. This is used to
|
||||
provide a static buffer and will be increased if we need to support
|
||||
longer fingerprints.
|
||||
Warning: At some places we still use 20 instead of this macro. */
|
||||
#define MAX_FINGERPRINT_LEN 20
|
||||
* provide a static buffer and will be increased if we need to support
|
||||
* longer fingerprints. Warning: At some places we have some
|
||||
* assumption on a 20 byte fingerprint.
|
||||
* Watch out for FIXME(fingerprint) */
|
||||
#define MAX_FINGERPRINT_LEN 32
|
||||
|
||||
/* The maximum length of a formatted fingerprint as returned by
|
||||
format_hexfingerprint(). */
|
||||
#define MAX_FORMATTED_FINGERPRINT_LEN 50
|
||||
* format_hexfingerprint(). */
|
||||
#define MAX_FORMATTED_FINGERPRINT_LEN 59
|
||||
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue