mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 07:26:29 -04:00
gnupg's scdaemon opens smart cards in exclusive mode, which prevents other
applications (such as PKCS#11 libraries) from concurrently accessing the
card). Upstream refuses to fix the problem. This commit adds a
--shared-access option to scdaemon. When enabled, scdaemon will access the
smart card in shared mode, playing nicely with other applications. The
default behavior is unchanged.
See Also:
d6cb8039a0
https://dev.gnupg.org/T3267
https://dev.gnupg.org/D320
https://github.com/OpenSC/OpenSC/issues/953
Reviewed by: adamw
Approved by: adamw (maintainer)
Obtained-from: GPGTools
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D22473
11 lines
518 B
C
11 lines
518 B
C
--- scd/apdu.c.orig 2019-07-09 09:08:45 UTC
|
|
+++ scd/apdu.c
|
|
@@ -816,7 +816,7 @@ connect_pcsc_card (int slot)
|
|
|
|
err = pcsc_connect (reader_table[slot].pcsc.context,
|
|
reader_table[slot].rdrname,
|
|
- PCSC_SHARE_EXCLUSIVE,
|
|
+ opt.shared_access ? PCSC_SHARE_SHARED : PCSC_SHARE_EXCLUSIVE,
|
|
PCSC_PROTOCOL_T0|PCSC_PROTOCOL_T1,
|
|
&reader_table[slot].pcsc.card,
|
|
&reader_table[slot].pcsc.protocol);
|