Page MenuHome GnuPG

895_0001-Let-other-processes-use-OpenPGP-card-over-pcscd.patch
AbandonedPublic

Authored by crosser on Oct 18 2016, 10:15 PM.

Details

Reviewers
None
Summary

From 02a143436c20a3dfe277946358bd6659000fbac7 Mon Sep 17 00:00:00 2001
From: Eugene Crosser <crosser@average.org>
Date: Tue, 18 Oct 2016 21:59:47 +0200
Subject: [PATCH] Let other processes use OpenPGP card over pcscd

Fix for the bug https://bugs.gnupg.org/gnupg/issue2053

When OpenPGP card functionality of Yubikey NEO is used over NFC,
and other process needs to access other OpenPlatform app on the
Yubikey (non-pkcs#11) using pcsclite API, the other process starts
gettingan error "Sharing violation" (SCARD_E_SHARING_VIOLATION)
after gnupg is run for the first time, and scdaemon is started.
The other application uses SCARD_SHARE_SHARED for SCardConnect().

Starting scdaemon with non-zero --card-timeout does not change
this behaviour.

Changing PCSC_SHARE_EXCLUSIVE to PCSC_SHARE_SHARED in
scd/apdu.c:1560 fixes the problem *and* has no ill effects on
Yubikey operation: gnupg --card-status interleaved with the other
application running in a loop at the same time work just fine,
both applications get their proper responses from the card.

Signed-off-by: Eugene Crosser <crosser@average.org>

scd/apdu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

2.9.3

Test Plan

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped