mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01: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
@ -1,3 +1,8 @@
|
||||
2004-09-17 Werner Koch <wk@g10code.com>
|
||||
|
||||
* configure.ac: Don't check for usb_create_match or
|
||||
use_get_string_simple anymore.
|
||||
|
||||
2004-09-15 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* configure.ac: Give warning when using capabilities. Check for
|
||||
|
@ -1097,9 +1097,7 @@ if test "$card_support" = yes; then
|
||||
])
|
||||
fi
|
||||
AC_SUBST(LIBUSB_LIBS)
|
||||
AC_CHECK_FUNCS(usb_create_match)
|
||||
AC_CHECK_FUNCS(usb_get_busses)
|
||||
AC_CHECK_FUNCS(usb_get_string_simple)
|
||||
|
||||
#
|
||||
# Check for readline support
|
||||
|
@ -1,3 +1,22 @@
|
||||
2004-09-17 Werner Koch <wk@g10code.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2004-09-16 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* keyedit.c (show_key_with_all_names, show_prefs): Show preferred
|
||||
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -75,9 +75,10 @@
|
||||
struct ccid_driver_s;
|
||||
typedef struct ccid_driver_s *ccid_driver_t;
|
||||
|
||||
int ccid_open_reader (ccid_driver_t *handle, int readerno);
|
||||
int ccid_close_reader (ccid_driver_t handle);
|
||||
int ccid_set_debug_level (int level);
|
||||
char *ccid_get_reader_list (void);
|
||||
int ccid_open_reader (ccid_driver_t *handle, const char *readerid);
|
||||
int ccid_close_reader (ccid_driver_t handle);
|
||||
int ccid_get_atr (ccid_driver_t handle,
|
||||
unsigned char *atr, size_t maxatrlen, size_t *atrlen);
|
||||
int ccid_slot_status (ccid_driver_t handle, int *statusbits);
|
||||
|
16
g10/g10.c
16
g10/g10.c
@ -1338,6 +1338,21 @@ list_config(char *items)
|
||||
any=1;
|
||||
}
|
||||
|
||||
if(show_all || ascii_strcasecmp(name,"ccid-reader-id")==0)
|
||||
{
|
||||
#if defined(ENABLE_CARD_SUPPORT) && defined(HAVE_LIBUSB)
|
||||
char *p, *p2, *list = ccid_get_reader_list ();
|
||||
|
||||
for (p=list; p && (p2 = strchr (p, '\n')); p = p2+1)
|
||||
{
|
||||
*p2 = 0;
|
||||
printf("cfg:ccid-reader-id:%s\n", p);
|
||||
}
|
||||
free (list);
|
||||
#endif
|
||||
any=1;
|
||||
}
|
||||
|
||||
if(show_all)
|
||||
break;
|
||||
|
||||
@ -1364,6 +1379,7 @@ gpgconf_list (const char *configfile)
|
||||
printf ("verbose:%lu:\n", GC_OPT_FLAG_NONE);
|
||||
printf ("quiet:%lu:\n", GC_OPT_FLAG_NONE);
|
||||
printf ("keyserver:%lu:\n", GC_OPT_FLAG_NONE);
|
||||
printf ("reader-port:%lu:\n", GC_OPT_FLAG_NONE);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user