summaryrefslogtreecommitdiffstats
path: root/g10/keydb.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-11-14 09:13:02 +0100
committerWerner Koch <wk@gnupg.org>2015-11-14 09:13:02 +0100
commit3689c2105aab6a4304e9464c5b20207d69b9a133 (patch)
tree9b6b205a05ed03edfe72f89983e55cf52d7222fc /g10/keydb.h
parentgpg: Simplify the tofu interface by using the public key packet. (diff)
downloadgnupg2-3689c2105aab6a4304e9464c5b20207d69b9a133.tar.xz
gnupg2-3689c2105aab6a4304e9464c5b20207d69b9a133.zip
gpg: Use only one fingerprint formatting function.
* g10/gpg.h (MAX_FORMATTED_FINGERPRINT_LEN): New. * g10/keyid.c (hexfingerprint): Add optional args BUFFER and BUFLEN. Change all callers. (format_hexfingerprint): New. * g10/keylist.c (print_fingerprint): Change to use hexfingerprint. * g10/tofu.c (fingerprint_format): Remove. Replace calls by format_hexfingerprint. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/keydb.h')
-rw-r--r--g10/keydb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/g10/keydb.h b/g10/keydb.h
index 76136c156..e909c0fec 100644
--- a/g10/keydb.h
+++ b/g10/keydb.h
@@ -809,7 +809,9 @@ const char *colon_datestr_from_pk (PKT_public_key *pk);
const char *colon_datestr_from_sig (PKT_signature *sig);
const char *colon_expirestr_from_sig (PKT_signature *sig);
byte *fingerprint_from_pk( PKT_public_key *pk, byte *buf, size_t *ret_len );
-char *hexfingerprint (PKT_public_key *pk);
+char *hexfingerprint (PKT_public_key *pk, char *buffer, size_t buflen);
+char *format_hexfingerprint (const char *fingerprint,
+ char *buffer, size_t buflen);
gpg_error_t keygrip_from_pk (PKT_public_key *pk, unsigned char *array);
gpg_error_t hexkeygrip_from_pk (PKT_public_key *pk, char **r_grip);