From be034cf34c3c5bc7787d9b2f8d4c7b6b948d4e2f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sat, 6 Sep 2003 13:23:48 +0000 Subject: * configure.ac: Required newer versions of some libraries. * misc.c (openpgp_pk_algo_usage): Allow AUTH where SIGN is allowed. * keygen.c (ask_passphrase): No need to allocated S2K in secure memory. * scdaemon.c (main): --pcsc-driver again defaults to pcsclite. David Corcoran was so kind to remove the GPL incompatible advertisng clause from pcsclite. * apdu.c (apdu_open_reader): Actually make pcsc-driver option work. --- scd/ccid-driver.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'scd/ccid-driver.c') diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index b18b055b0..6f469de6a 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -286,7 +286,9 @@ bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length, rc = usb_bulk_read (handle->idev, 0x82, buffer, length, - 1000 /* ms timeout */ ); + 10000 /* ms timeout */ ); + /* Fixme: instead of using a 10 second timeout we should better + handle the timeout here and retry if appropriate. */ if (rc < 0) { DEBUGOUT_1 ("usb_bulk_read error: %s\n", strerror (errno)); @@ -556,10 +558,10 @@ ccid_transceive (ccid_driver_t handle, DEBUGOUT_CONT_1 (" %02X", msg[i]); DEBUGOUT_LF (); - fprintf (stderr, "T1: put %c-block seq=%d\n", - ((msg[11] & 0xc0) == 0x80)? 'R' : - (msg[11] & 0x80)? 'S' : 'I', - ((msg[11] & 0x80)? !!(msg[11]& 0x10) : !!(msg[11] & 0x40))); +/* fprintf (stderr, "T1: put %c-block seq=%d\n", */ +/* ((msg[11] & 0xc0) == 0x80)? 'R' : */ +/* (msg[11] & 0x80)? 'S' : 'I', */ +/* ((msg[11] & 0x80)? !!(msg[11]& 0x10) : !!(msg[11] & 0x40))); */ rc = bulk_out (handle, msg, msglen); if (rc) @@ -576,16 +578,16 @@ ccid_transceive (ccid_driver_t handle, if (tpdulen < 4) { - DEBUGOUT ("cannot yet handle short block!!\n"); + DEBUGOUT ("cannot yet handle short blocks!\n"); return -1; } - fprintf (stderr, "T1: got %c-block seq=%d err=%d\n", - ((msg[11] & 0xc0) == 0x80)? 'R' : - (msg[11] & 0x80)? 'S' : 'I', - ((msg[11] & 0x80)? !!(msg[11]& 0x10) : !!(msg[11] & 0x40)), - ((msg[11] & 0xc0) == 0x80)? (msg[11] & 0x0f) : 0 - ); +/* fprintf (stderr, "T1: got %c-block seq=%d err=%d\n", */ +/* ((msg[11] & 0xc0) == 0x80)? 'R' : */ +/* (msg[11] & 0x80)? 'S' : 'I', */ +/* ((msg[11] & 0x80)? !!(msg[11]& 0x10) : !!(msg[11] & 0x40)), */ +/* ((msg[11] & 0xc0) == 0x80)? (msg[11] & 0x0f) : 0 */ +/* ); */ if (!(tpdu[1] & 0x80)) { /* This is an I-block. */ -- cgit v1.2.3