summaryrefslogtreecommitdiffstats
path: root/g10/gpg.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-11-13 16:42:59 +0100
committerWerner Koch <wk@gnupg.org>2015-11-13 16:42:59 +0100
commite7d7160ab7cd4e6b460bfe36fd3a7275adadb4e2 (patch)
tree5a70be6127bd70c5e584f1e24be0c4be0bbe6f7d /g10/gpg.h
parentgpg: Make trusted-key override for Tofu robust against swapped tofu.db. (diff)
downloadgnupg2-e7d7160ab7cd4e6b460bfe36fd3a7275adadb4e2.tar.xz
gnupg2-e7d7160ab7cd4e6b460bfe36fd3a7275adadb4e2.zip
gpg: Simplify the tofu interface by using the public key packet.
* g10/tofu.c (fingerprint_str): Remove. (tofu_register): Take a public key instead of a fingerprint as arg. Use hexfingerprint() to get a fpr from the PK. (tofu_get_validity): Ditto. (tofu_set_policy, tofu_get_policy): Simplify by using hexfingerprint. * g10/trustdb.c (tdb_get_validity_core): Pass the primary key PK to instead of the fingerprint to the tofu functions. -- This change has the advantage that we are not bound to a specific fingerprint length and will thus helps us to implement rfc4880bis. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/gpg.h')
-rw-r--r--g10/gpg.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/g10/gpg.h b/g10/gpg.h
index accec248c..6f92abdde 100644
--- a/g10/gpg.h
+++ b/g10/gpg.h
@@ -37,7 +37,9 @@
/* Number of bits we accept when reading or writing MPIs. */
#define MAX_EXTERN_MPI_BITS 16384
-/* The maximum length of a binary fingerprints.
+/* 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