diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2021-05-06 12:08:34 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2021-05-06 12:08:34 +0200 |
commit | 53bdc6288f9b474e53f06088130e304cee41b12d (patch) | |
tree | a2c93d5b7748f6ee1522cdfdd50dd672ea0e495b /scd/apdu.c | |
parent | scd: When reader is specified, make sure only open once. (diff) | |
download | gnupg2-53bdc6288f9b474e53f06088130e304cee41b12d.tar.xz gnupg2-53bdc6288f9b474e53f06088130e304cee41b12d.zip |
scd: Recover the partial match for PORTSTR for PC/SC.
* scd/apdu.c (apdu_open_reader): Allow partial match of
PORTSTR again just like 2.2 does.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'scd/apdu.c')
-rw-r--r-- | scd/apdu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scd/apdu.c b/scd/apdu.c index 44ef445c8..8a48d6769 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2239,7 +2239,8 @@ apdu_open_reader (struct dev_list *dl) log_debug ("apdu_open_reader: new device=%s\n", rdrname); /* When reader string is specified, check if it is the one. */ - if (readerno < 0 && strcmp (rdrname, dl->portstr) != 0) + if (readerno < 0 + && strncmp (rdrname, dl->portstr, strlen (dl->portstr)) != 0) continue; slot = open_pcsc_reader (rdrname); |