Home GnuPG
Diffusion GnuPG 108702ccae8f

gpg: Prepare for longer card fingerprints.

Description

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>

Details

Provenance
wernerAuthored on Aug 27 2018, 4:57 PM
Parents
rGb823788d2009: g10: Fix enum_secret_keys for card keys.
Branches
Unknown
Tags
Unknown

Event Timeline

When we will actually extend the fingerprints, more changes (spec and implementation) will be required because of the length limitation of DO 0x6E.
See https://dev.gnupg.org/T4097