diff options
author | Werner Koch <[email protected]> | 2004-09-17 14:26:50 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-09-17 14:26:50 +0000 |
commit | ca26884b3a70f3fc6b37fa67a1e213f9e2eabf94 (patch) | |
tree | 40c09d0528414a226847aba7f015f040c2acf579 /g10/apdu.c | |
parent | * configure.ac: Don't check for usb_create_match or (diff) | |
download | gnupg-ca26884b3a70f3fc6b37fa67a1e213f9e2eabf94.tar.gz gnupg-ca26884b3a70f3fc6b37fa67a1e213f9e2eabf94.zip |
(apdu_open_reader): No fallback if a full CCID reader id has been
Removed test code from ccid-driver.c
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 */ |