mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* 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.
This commit is contained in:
parent
4accf027d2
commit
f08c4222b7
7 changed files with 630 additions and 300 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue