Home GnuPG
Diffusion GnuPG 044e5a3c3801

scd: Detect external interference when PCSC_SHARED.
Concern Raised044e5a3c3801

Description

scd: Detect external interference when PCSC_SHARED.

* scd/app-common.h (check_aid): New method.
* scd/app-openpgp.c (do_check_aid): New.
* scd/app-piv.c (do_check_aid): New.
* scd/app.c (check_external_interference): New.
(maybe_switch_app): Check interference to determine switching is
needed.
  • GnuPG-bug-id: T5484
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Event Timeline

Sanmilie added a subscriber: Sanmilie.

Line 1454 : if (!opt.pcsc_shared || app->card->cardtype != CARDTYPE_YUBIKEY)
need to remove || app->card->cardtype != CARDTYPE_YUBIKEY

Need the interferecne check always when the PCSC_Shared is enabled. not only for yubikey
Line 1454 : if (!opt.pcsc_shared)

This commit now has outstanding concerns.Aug 24 2021, 8:40 PM

I understand your problem.

The intention of the condition is to minimize the check.

IIUC about your use case, it would be good to add CARDTYPE_SOMETHING and add that one to the condition.

Please open new ticket for this.