gpg: Simplify the tofu interface by using the public key packet.
authorWerner Koch <wk@gnupg.org>
Fri, 13 Nov 2015 15:42:59 +0000 (16:42 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 13 Nov 2015 15:42:59 +0000 (16:42 +0100)
commite7d7160ab7cd4e6b460bfe36fd3a7275adadb4e2
tree5a70be6127bd70c5e584f1e24be0c4be0bbe6f7d
parent7de8376430625c1f6f3a58ae16276deca8ff6a82
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>
g10/gpg.h
g10/tofu.c
g10/tofu.h
g10/trustdb.c