gpg: Prepare for longer card fingerprints.
authorWerner Koch <wk@gnupg.org>
Mon, 27 Aug 2018 14:57:04 +0000 (16:57 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 27 Aug 2018 14:57:04 +0000 (16:57 +0200)
commit108702ccae8ff1e5fec3b8e710f06a03637244c7
treea9babf44f01921abed2e4c601207b48cce9435c4
parentb823788d200902f34c632026934cf0e43152b73e
gpg: Prepare for longer card fingerprints.

* g10/call-agent.h (agent_card_info_s): Rename the "*valid" fields to
"*len".
* g10/call-agent.c (unhexify_fpr): Change to take a FPRLEN and to
return the actual length.
(agent_release_card_info): Adjust for these changes.
* g10/card-util.c (print_sha1_fpr): Rename to print_shax_fpr and add
arg FPRLEN.  Change all callers to pass the length.
(print_sha1_fpr_colon): Rename to print_shax_fpr_colon and add arg
FPRLEN.  Change all callers to pass the length.
(fpr_is_zero): Add arg FPRLEN.
(fpr_is_ff): Ditto.
(show_card_key_info): Use the new functions.
* g10/skclist.c (enum_secret_keys): Use MAX_FINGERPRINT_LEN.
--

This is not needed right now but we should get rid of all hard coded
fingerprint lengths.  Thus this change.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/call-agent.c
g10/call-agent.h
g10/card-util.c
g10/skclist.c