Home GnuPG
Diffusion Scute 7a4de78ae1d1

Bunch of refactoring and minor changes for PIV cards.

Description

Bunch of refactoring and minor changes for PIV cards.

* src/agent.h (struct key_info_s): New.
(struct agent_card_info_s): Add cardtype, kinfo and is_piv members.
(agent_card_info_t): New.
* src/cert-object.c: Get rid of the CERT_PARSING documentation macro
and replace the attr_one_ext et al macros by straight code for
easier readability.
* src/agent.c (hexgrip_valid_p): New.
(scute_agent_release_card_info): Free kinfo member.
(scute_find_kinfo): New.
(create_kinfo): New.
(learn_status_cb): Parse APPTYPE and CARDTYPE. Extend KEYPAIRINFO
parsing.
(scute_agent_get_cert): Change int arg 'no' to a string arg 'certref'.
* src/gpgsm.c (scute_gpgsm_get_cert): Likewise.
* src/slots.c (slot_init): Adjust for change
(slots_update_slot): Allow for PIV cards.
(slot_token_application): Return "PIV" or "OpenPGP".
(slot_token_serial): Support PIV cards.
(slot_token_version): Ditto.
* src/support.h (scute_copy_string): Make second arg a const.
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Feb 14 2019, 11:49 AM
Parents
rS1d416088cb94: Improve t-getslotinfo, t-getslotlist and t-opensession
Branches
Unknown
Tags
Unknown