aboutsummaryrefslogtreecommitdiffstats
path: root/g10/apdu.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-09-17 13:57:29 +0000
committerWerner Koch <[email protected]>2004-09-17 13:57:29 +0000
commitf08c4222b705bc0c4f0ba1a71979d54b93bdb733 (patch)
treea8b4fa377ea059263c762ce5a8bd19fbd369273d /g10/apdu.c
parent* keyedit.c (show_key_with_all_names, show_prefs): Show preferred (diff)
downloadgnupg-f08c4222b705bc0c4f0ba1a71979d54b93bdb733.tar.gz
gnupg-f08c4222b705bc0c4f0ba1a71979d54b93bdb733.zip
* configure.ac: Don't check for usb_create_match or
use_get_string_simple anymore. * g10.c (list_config): New config option ccid-reader-id. (gpgconf_list): Add "reader-port". * apdu.c (open_ccid_reader): New arg PORTSTR. Pass it to ccid_open_reader. (apdu_open_reader): Pass portstr to open_ccid_reader. * ccid-driver.c (ccid_get_reader_list): New. (ccid_open_reader): Changed API to take a string for the reader. Removed al the cruft for the libusb development vesion which seems not to be maintained anymore and there are no packages anyway. The stable library works just fine. (struct ccid_reader_id_s): Deleted and replaced everywhere by a simple string. (usb_get_string_simple): Removed. (bulk_in): Do valgrind hack here and not just everywhere.
Diffstat (limited to '')
-rw-r--r--g10/apdu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/apdu.c b/g10/apdu.c
index 5f800c983..00f149205 100644
--- a/g10/apdu.c
+++ b/g10/apdu.c
@@ -1273,7 +1273,7 @@ send_apdu_ccid (int slot, unsigned char *apdu, size_t apdulen,
/* Open the reader and try to read an ATR. */
static int
-open_ccid_reader (void)
+open_ccid_reader (const char *portstr)
{
int err;
int slot;
@@ -1284,7 +1284,7 @@ open_ccid_reader (void)
return -1;
slotp = reader_table + slot;
- err = ccid_open_reader (&slotp->ccid.handle, 0);
+ err = ccid_open_reader (&slotp->ccid.handle, portstr);
if (err)
{
slotp->used = 0;
@@ -1881,10 +1881,11 @@ apdu_open_reader (const char *portstr)
{
int slot;
- slot = open_ccid_reader ();
+ slot = open_ccid_reader (portstr);
if (slot != -1)
return slot; /* got one */
}
+
#endif /* HAVE_LIBUSB */
#ifdef HAVE_OPENSC