scd: PC/SC reader selection by partial string match.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 30 Apr 2015 03:36:38 +0000 (12:36 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 1 May 2015 05:16:28 +0000 (14:16 +0900)
commit3f9f33bbcb40146c6f09277a28d499188ed34ef2
tree10f857ad6a81859996187cf69a12f66192731486
parent43429c7869152f301157e4b24790b3801dce0f0a
scd: PC/SC reader selection by partial string match.

* scd/apdu.c (open_pcsc_reader_direct): Partial string match.
* scd/pcsc-wrapper.c (handle_open): Likewise.

--

(backport from 2.1 commit 01a2a61bc4b34817c4216888265f65d59a33dad3)

The card reader name by PC/SC service might include USB bus,
which varies (on some platform like GNU/Linux).  Thus, it's
better to match partial string.

Original patch was submitted by anstein.  I changed it to fallback to
the first reader if no match found.

GnuPG-bug-id: 1618, 1930
scd/apdu.c
scd/pcsc-wrapper.c