diff options
Diffstat (limited to '')
-rw-r--r-- | g10/apdu.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/g10/apdu.c b/g10/apdu.c index 00f149205..a3aa1ba9f 100644 --- a/g10/apdu.c +++ b/g10/apdu.c @@ -1879,11 +1879,19 @@ apdu_open_reader (const char *portstr) #ifdef HAVE_LIBUSB if (!opt.disable_ccid) { - int slot; + int slot, i; + const char *s; slot = open_ccid_reader (portstr); if (slot != -1) return slot; /* got one */ + + /* If a CCID reader specification has been given, the user does + not want a fallback to other drivers. */ + if (portstr) + for (s=portstr, i=0; *s; s++) + if (*s == ':' && (++i == 3)) + return -1; } #endif /* HAVE_LIBUSB */ |