Home GnuPG
Diffusion GnuPG 1e197c29ed95

scd:p15: Make file selection more robust.

Description

scd:p15: Make file selection more robust.

* scd/app-p15.c: Include host2net.h.
(DEFAULT_HOME_DF): New.
(select_and_read_binary): Replace slot by app.  Change callers.  Use
select_ef_by_path.
(select_and_read_record): ditto.
(select_ef_by_path): Make use use the home_df.
(parse_certid): Adjust for always set home_df.
(print_tokeninfo_tokenflags): Ditto.
(app_select_p15): Take the home_df from the FCI returned by select.

This uses modern APDUs and always selectd starting at the PCKS-15 home
DF. We could have made this much simpler but the goal is to keep
support for older cards although we can't test that easily.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Jan 27 2021, 6:39 PM
Parents
rG7620473cd007: scd: Define new status word
Branches
Unknown
Tags
Unknown