From morecmencrossroad@wildmail.com Sun Feb 1 12:43:07 2004 From: morecmencrossroad@wildmail.com (Special-prosecutors) Date: Sun, 01 Feb 2004 12:43:07 +0000 Subject: [Pcsclite-cvs-commit] Cum And Look Like A P0RN STAR!!!!!!!! fanaticismheckle Message-ID: cumpills2
SHOWER YOUR LOVER WITH
BUCKET LOADS OF SP.ERM!
 

It's Amazing & Has Finally Arrived! A Unique Pill That Will Increase Your Spe.rm By Up To 500% More We Guaran.teed It!

Maintain Rock Solid Erect.ions
Increased Se.xual Desire & Performance
- Shoot Out Amazing Amounts Of Spe.rm Everywhere

- Multiple Extreme Orga.sms! Have 2 Or 3 Each Time.
- 100% Mon.ey Back Guar.antee With Every Order.
 

EJACU.LATE LIKE A P0RN STAR

MORE INFO HERE
 
 

no more emailz

thievesOsborn From moreinchesresultants@wildmail.com Sun Feb 1 21:15:21 2004 From: moreinchesresultants@wildmail.com (Pkg-gnome-maintainers) Date: Sun, 01 Feb 2004 22:15:21 +0100 Subject: [Pcsclite-cvs-commit] NaturalGain+ , What more do you want? bagged Message-ID: natgain+

THE NEW
NaturalGain+ Pen1s Enlargement Pills

will
EXPAND
LENGTHEN
and
ENLARGE YOUR PEN1S 3+ INCHES

* 100% Mon.ey Back Guaran.tee
* FR.EE Bottle Of NaturalGain+ Worth Over $50
* FR.EE "Male Help E-Book" Worth Over $50

MORE INFO HERE
 

no more emailz

globebelting From rousseau@quantz.debian.org Mon Feb 2 10:05:36 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 02 Feb 2004 11:05:36 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src create_Info_plist.pl,NONE,1.1 Info.plist,1.5,1.6 Makefile.am,1.9,1.10 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv14638/src Modified Files: Info.plist Makefile.am Added Files: create_Info_plist.pl Log Message: use create_Info_plist.pl to generate the installed Info.plist from an Info.plist template and a list of supported readers. --- NEW FILE: create_Info_plist.pl --- #!/usr/bin/perl # create_Info_plist.pl: generate Infor.plist from a template and a # list of suported readers # # Copyright (C) 2004 Ludovic Rousseau # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA use warnings; use strict; my (@manuf, @product, @name); my ($manuf, $product, $name); if ($#ARGV ne 1) { print "usage: $0 supported_readers.txt Info.plist\n"; exit; } open IN, "< $ARGV[0]" or die "Can't open $ARGV[0]: $!"; while () { next if (m/^#/); next if (m/^$/); chomp; ($manuf, $product, $name) = split /:/; # print "m: $manuf, p: $product, n: $name\n"; push @manuf, $manuf; push @product, $product; push @name, $name } close IN; map { $_ = "\t\t$_\n" } @manuf; map { $_ = "\t\t$_\n" } @product; map { $_ = "\t\t$_\n" } @name; open IN, "< $ARGV[1]" or die "Can't open $ARGV[1]: $!"; while () { if (m/VENDOR/) { print @manuf; next; } if (m/PRODUCT/) { print @product; next; } if (m/FRIENDLYNAME/) { print @name; next; } print; } close IN; Index: Info.plist =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/Info.plist,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Info.plist 27 Jan 2004 13:40:29 -0000 1.5 +++ Info.plist 2 Feb 2004 10:05:34 -0000 1.6 @@ -30,59 +30,17 @@ ifdVendorID - 0x08E6 - 0x08E6 - 0x08E6 - - 0x04E6 - 0x04E6 - 0x04E6 - - 0x076B - - 0x0783 - - 0x09C3 - - 0x047B + VENDOR ifdProductID - 0x3437 - 0x3438 - 0x4433 - - 0x5115 - 0xE001 - 0xE003 - - 0x3021 - - 0x0003 - - 0x0008 - - 0x020B + PRODUCT ifdFriendlyName - GemPC Twin - GemPC Key - GemPC433 SL - - SCR 335 - SCR 331 - SPR 532 - - CardMan 3121 - - LTC31 - - ActivCard - - SK-3105 + FRIENDLYNAME Copyright Index: Makefile.am =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile.am 22 Jan 2004 14:00:38 -0000 1.9 +++ Makefile.am 2 Feb 2004 10:05:34 -0000 1.10 @@ -58,7 +58,7 @@ install_ccid: libccid.la $(mkinstalldirs) $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/$(BUNDLE_HOST)/ cp .libs/$(CCID_LIB) $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/$(BUNDLE_HOST)/$(CCID_LIB).$(VERSION) - sed s/VERSION/$(VERSION)/ $(srcdir)/Info.plist | sed s/TARGET/$(CCID_LIB)/ > $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/Info.plist + ./create_Info_plist.pl ../readers/supported_readers.txt Info.plist | sed s/VERSION/$(VERSION)/ | sed s/TARGET/$(CCID_LIB)/ > $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/Info.plist install_ccidtwin: libccidtwin.la $(mkinstalldirs) $(DESTDIR)$(ccidtwindir) From rousseau@quantz.debian.org Mon Feb 2 10:05:37 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 02 Feb 2004 11:05:37 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/readers supported_readers.txt,NONE,1.1 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/readers In directory quantz:/tmp/cvs-serv14638/readers Added Files: supported_readers.txt Log Message: use create_Info_plist.pl to generate the installed Info.plist from an Info.plist template and a list of supported readers. --- NEW FILE: supported_readers.txt --- # list of supported readers for the CCID driver # $Id: supported_readers.txt,v 1.1 2004/02/02 10:05:34 rousseau Exp $ # Gemplus 0x08E6:0x3437:GemPC Twin 0x08E6:0x3438:GemPC Key 0x08E6:0x4433:GemPC433 SL # SCM Microsystems 0x04E6:0x5111:SCR 331-DI 0x04E6:0x5115:SCR 335 0x04E6:0xE001:SCR 331 0x04E6:0xE003:SPR 532 # OmniKey 0x076B:0x3021:CardMan 3121 # C3PO 0x0783:0x0003:LTC31 # ActivCard 0x09C3:0x0008:ActivCard # Silitek 0x047B:0x020B:SK-3105 From rousseau@quantz.debian.org Mon Feb 2 10:33:28 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 02 Feb 2004 11:33:28 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid README,1.16,1.17 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid In directory quantz:/tmp/cvs-serv21967 Modified Files: README Log Message: add SCR 331-DI in the "should work" list Index: README =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/README,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- README 27 Jan 2004 13:53:10 -0000 1.16 +++ README 2 Feb 2004 10:33:26 -0000 1.17 @@ -32,6 +32,7 @@ move them in the supported list above. If you are one of the manufacturers, please, contact me. +- SCM Micro SCR 331-DI [11] - SCM Micro SPR 532 [9] - ActivCard USB reader 2.0 [10] - Silitek SK-3105 keyboard @@ -192,6 +193,7 @@ [8] http://www.c3po.es/pcsc.htm [9] http://www.scmmicro.com/security/SPR532.html [10] http://www.activcard.com/products/usb_reader.html +[11] http://www.scmmicro.com/security/SCR331-DI.html $Id$ From rousseau@quantz.debian.org Mon Feb 2 15:44:10 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 02 Feb 2004 16:44:10 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src/protocol_t1 protocol_t1.c,1.1,1.2 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1 In directory quantz:/tmp/cvs-serv9703/protocol_t1 Modified Files: protocol_t1.c Log Message: remove PPS hack Index: protocol_t1.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/protocol_t1.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- protocol_t1.c 15 Jan 2004 14:34:21 -0000 1.1 +++ protocol_t1.c 2 Feb 2004 15:44:08 -0000 1.2 @@ -100,17 +100,6 @@ /* Set initial send sequence (NS) */ t1->ns = 1; - /* PPS */ - { - int len = 3; - BYTE pps[] = {0xFF, 0x11, 0x94, 0}; - BYTE param[] = {0x94, 0x10, 0x00, 0x43, 0x00, 0x20, 0x00}; - - PPS_Exchange(t1, pps, &len); - - SetParameters(t1->lun, 1, 7, param); - } - #ifdef DEBUG_PROTOCOL printf ("Protocol: T=1: IFSC=%d, IFSD=%d, EDC=%s\n", t1->ifsc, t1->ifsd, (t1->edc == PROTOCOL_T1_EDC_LRC) ? "LRC" : "CRC"); From rousseau@quantz.debian.org Mon Feb 2 15:45:16 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 02 Feb 2004 16:45:16 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src/protocol_t1 protocol_t1.c,1.2,1.3 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1 In directory quantz:/tmp/cvs-serv9755/protocol_t1 Modified Files: protocol_t1.c Log Message: do not restrict ifsc to Towitoko Index: protocol_t1.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/protocol_t1.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- protocol_t1.c 2 Feb 2004 15:44:08 -0000 1.2 +++ protocol_t1.c 2 Feb 2004 15:45:14 -0000 1.3 @@ -86,7 +86,7 @@ t1->ifsc = PROTOCOL_T1_DEFAULT_IFSC; /* Towitoko does not allow IFSC > 251 */ - t1->ifsc = MIN (t1->ifsc, PROTOCOL_T1_MAX_IFSC); + /*t1->ifsc = MIN (t1->ifsc, PROTOCOL_T1_MAX_IFSC);*/ /* Set IFSD */ t1->ifsd = PROTOCOL_T1_DEFAULT_IFSD; From 01agebackcontend@rocketmail.com Mon Feb 2 23:50:25 2004 From: 01agebackcontend@rocketmail.com (Sepi) Date: Mon, 02 Feb 2004 23:50:25 +0000 Subject: [Pcsclite-cvs-commit] Wanna look younger again?? Gaston Message-ID: hghspray
Natural HGH Plus Spray

Human Growth Hormone - also called HGH is referred to in medical science as the master hormone. It is very plentiful when we are young, but near the age of twenty-one our bodies begin to produce less of it. By the time we are forty nearly everyone is deficient in HGH, and at eighty our production has normally diminished at least 90-95%.

We are so confident of the difference Natural HGH Plus Spray will make in your life that we offer an exclusive:

60-day Mo.ney-Back Guar.antee!,MORE INFO
 

no more emailz


lazybonesbelaboring From rousseau@quantz.debian.org Tue Feb 3 14:59:06 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Tue, 03 Feb 2004 15:59:06 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/readers SCR331-DI.txt,NONE,1.1 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/readers In directory quantz:/tmp/cvs-serv7611 Added Files: SCR331-DI.txt Log Message: new file --- NEW FILE: SCR331-DI.txt --- iManufacturer: SCM Microsystems Inc. iProduct: SCR331-DI USB Smart Card Reader bLength: 9 bDescriptorType: 4 bInterfaceNumber: 0 bAlternateSetting: 0 bNumEndpoints: 3 bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)] bInterfaceSubClass: 0 bInterfaceProtocol: 0 iInterface: 4 CCID Class Descriptor bLength: 0x36 bDescriptorType: 0x21 bcdCCID: 1.00 bMaxSlotIndex: 0x00 bVoltageSupport: 0x01 5.0V dwProtocols: 0x0000 0x0003 T=0 T=1 dwDefaultClock: 4.000 MHz dwMaximumClock: 12.000 MHz bNumClockSupported: 0x00 dwDataRate: 9600 bps dwMaxDataRate: 307200 bps bNumDataRatesSupported: 0 dwMaxIFSD: 252 dwSynchProtocols: 0x00000000 dwMechanical: 0x00000000 No special characteristics dwFeatures: 0x000100BA Automatic parameter configuration based on ATR data Automatic ICC voltage selection Automatic ICC clock frequency change according to parameters Automatic baud rate change according to frequency and Fi, Di parameters Automatic PPS made by the ICC TPDU level exchange dwMaxCCIDMessageLength: 263 bytes bClassGetResponse: 255 bClassEnveloppe: 255 wLcdLayout: 0x0000 bPINSupport: 0x00 bMaxCCIDBusySlots: 1 From rousseau@quantz.debian.org Tue Feb 3 15:42:26 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Tue, 03 Feb 2004 16:42:26 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src/protocol_t1 pps.c,1.1,1.2 protocol_t1.c,1.3,1.4 t1_block.c,1.1,1.2 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1 In directory quantz:/tmp/cvs-serv15898/src/protocol_t1 Modified Files: pps.c protocol_t1.c t1_block.c Log Message: use my own debug routines Index: pps.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/pps.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- pps.c 15 Jan 2004 14:34:21 -0000 1.1 +++ pps.c 3 Feb 2004 15:42:24 -0000 1.2 @@ -30,6 +30,7 @@ #include "commands.h" #include "defs.h" #include "ifdhandler.h" +#include "debug.h" /* * Not exported constants definition @@ -61,19 +62,11 @@ BYTE confirm[PPS_MAX_LENGTH]; unsigned len_request, len_confirm; int ret; -#ifdef DEBUG_PROTOCOL - int i; -#endif len_request = PPS_GetLength (params); params[len_request - 1] = PPS_GetPCK(params, len_request - 1); -#ifdef DEBUG_PROTOCOL - printf ("PPS: Sending request: "); - for (i = 0; i < len_request; i++) - printf ("%X ", params[i]); - printf ("\n"); -#endif + DEBUG_XXD ("PPS: Sending request: ", params, len_request); /* Send PPS request */ if (CCID_Transmit (t1->lun, len_request, params) != IFD_SUCCESS) @@ -86,12 +79,7 @@ len_confirm = PPS_GetLength (confirm); -#ifdef DEBUG_PROTOCOL - printf ("PPS: Receivig confirm: "); - for (i = 0; i < len_confirm; i++) - printf ("%X ", confirm[i]); - printf ("\n"); -#endif + DEBUG_XXD ("PPS: Receivig confirm: ", confirm, len_confirm); if (!PPS_Match (params, len_request, confirm, len_confirm)) ret = PPS_HANDSAKE_ERROR; Index: protocol_t1.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/protocol_t1.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- protocol_t1.c 2 Feb 2004 15:45:14 -0000 1.3 +++ protocol_t1.c 3 Feb 2004 15:42:24 -0000 1.4 @@ -33,6 +33,7 @@ #include "ccid.h" #include "commands.h" #include "ifdhandler.h" +#include "debug.h" /* * Not exported constants definition @@ -45,8 +46,6 @@ #define PROTOCOL_T1_EDC_LRC 0 #define PROTOCOL_T1_EDC_CRC 1 -/* #define DEBUG_PROTOCOL */ - /* * Not exported functions declaration */ @@ -100,10 +99,8 @@ /* Set initial send sequence (NS) */ t1->ns = 1; -#ifdef DEBUG_PROTOCOL - printf ("Protocol: T=1: IFSC=%d, IFSD=%d, EDC=%s\n", + DEBUG_COMM4 ("T=1: IFSC=%d, IFSD=%d, EDC=%s\n", t1->ifsc, t1->ifsd, (t1->edc == PROTOCOL_T1_EDC_LRC) ? "LRC" : "CRC"); -#endif return PROTOCOL_T1_OK; } @@ -130,9 +127,7 @@ /* Create an I-Block */ block = T1_Block_NewIBlock (bytes, cmd->command, t1->ns, more); -#ifdef DEBUG_PROTOCOL - printf ("Sending block I(%d,%d)\n", t1->ns, more); -#endif + DEBUG_COMM3 ("Sending block I(%d,%d)\n", t1->ns, more); /* Send a block */ ret = Protocol_T1_SendBlock (t1, block); @@ -152,9 +147,7 @@ /* Positive ACK R-Block received */ if (rsp_type == T1_BLOCK_R_OK) { -#ifdef DEBUG_PROTOCOL - printf ("Protocol: Received block R(%d)\n", T1_Block_GetNR (block)); -#endif + DEBUG_COMM2 ("Received block R(%d)\n", T1_Block_GetNR (block)); /* Delete block */ T1_Block_Delete (block); @@ -172,9 +165,7 @@ block = T1_Block_NewIBlock (bytes, cmd->command + counter, t1->ns, more); -#ifdef DEBUG_PROTOCOL - printf ("Protocol: Sending block I(%d,%d)\n", t1->ns, more); -#endif + DEBUG_COMM3 ("Sending block I(%d,%d)\n", t1->ns, more); /* Send a block */ ret = Protocol_T1_SendBlock (t1, block); @@ -214,10 +205,9 @@ if (rsp_type == T1_BLOCK_I) { -#ifdef DEBUG_PROTOCOL - printf ("Protocol: Received block I(%d,%d)\n", + DEBUG_COMM3 ("Received block I(%d,%d)\n", T1_Block_GetNS(block), T1_Block_GetMore (block)); -#endif + /* Calculate nr */ nr = (T1_Block_GetNS (block) + 1) % 2; @@ -237,9 +227,8 @@ { /* Create an R-Block */ block = T1_Block_NewRBlock (T1_BLOCK_R_OK, nr); -#ifdef DEBUG_PROTOCOL - printf ("Protocol: Sending block R(%d)\n", nr); -#endif + DEBUG_COMM2 ("Sending block R(%d)\n", nr); + /* Send R-Block */ ret = Protocol_T1_SendBlock (t1, block); @@ -253,17 +242,15 @@ { /* Get wtx multiplier */ wtx = (*T1_Block_GetInf (block)); -#ifdef DEBUG_PROTOCOL - printf ("Protocol: Received block S(WTX request, %d)\n", wtx); -#endif + DEBUG_COMM2 ("Received block S(WTX request, %d)\n", wtx); + /* Delete block */ T1_Block_Delete (block); /* Create an WTX response S-Block */ block = T1_Block_NewSBlock (T1_BLOCK_S_WTX_RES, 1, &wtx); -#ifdef DEBUG_PROTOCOL - printf ("Protocol: Sending block S(WTX response, %d)\n", wtx); -#endif + DEBUG_COMM2 ("Sending block S(WTX response, %d)\n", wtx); + /* Send WTX response */ ret = Protocol_T1_SendBlock (t1, block); Index: t1_block.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/t1_block.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- t1_block.c 15 Jan 2004 14:34:21 -0000 1.1 +++ t1_block.c 3 Feb 2004 15:42:24 -0000 1.2 @@ -24,13 +24,6 @@ #include #include -/* #define DEBUG_PROTOCOL */ - -#ifdef DEBUG_PROTOCOL -#include -#include "debug.h" -#endif - /* * Not exported constants definition */ From rousseau@quantz.debian.org Tue Feb 3 15:42:56 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Tue, 03 Feb 2004 16:42:56 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src debug.h,1.4,1.5 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv15922/src Modified Files: debug.h Log Message: add DEBUG_COMM3() Index: debug.h =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/debug.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- debug.h 29 Jan 2004 10:31:15 -0000 1.4 +++ debug.h 3 Feb 2004 15:42:53 -0000 1.5 @@ -88,12 +88,14 @@ #define DEBUG_COMM(fmt) debug_msg("%s:%d:%s " fmt, __FILE__, __LINE__, __FUNCTION__) #define DEBUG_COMM2(fmt, data) debug_msg("%s:%d:%s " fmt, __FILE__, __LINE__, __FUNCTION__, data) #define DEBUG_COMM3(fmt, data1, data2) debug_msg("%s:%d:%s " fmt, __FILE__, __LINE__, __FUNCTION__, data1, data2) +#define DEBUG_COMM4(fmt, data1, data2, data3) debug_msg("%s:%d:%s " fmt, __FILE__, __LINE__, __FUNCTION__, data1, data2, data3) #define DEBUG #define DEBUG_XXD(msg, buffer, size) debug_xxd(msg, buffer, size) #else #define DEBUG_COMM(fmt) #define DEBUG_COMM2(fmt, data) #define DEBUG_COMM3(fmt, data1, data2) +#define DEBUG_COMM3(fmt, data1, data2, data3) #endif #ifndef DEBUG_XXD From rousseau@quantz.debian.org Tue Feb 3 15:43:53 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Tue, 03 Feb 2004 16:43:53 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src ccid.h,1.1,1.2 ccid_serial.c,1.6,1.7 ccid_usb.c,1.14,1.15 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv15965/src Modified Files: ccid.h ccid_serial.c ccid_usb.c Log Message: add dwMaxIFSD field Index: ccid.h =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ccid.h 10 Sep 2003 09:15:51 -0000 1.1 +++ ccid.h 3 Feb 2004 15:43:51 -0000 1.2 @@ -39,6 +39,11 @@ int dwMaxCCIDMessageLength; /* + * Maximum IFSD + */ + int dwMaxIFSD; + + /* * Features supported by the reader (directly from class Descriptor) */ int dwFeatures; @@ -46,10 +51,11 @@ } _ccid_descriptor; #define CCID_CLASS_AUTO_VOLTAGE 0x00000008 -#define CCID_CLASS_EXCHANGE_MASK 0x00070000 +#define CCID_CLASS_AUTO_PPS_CUR 0x00000080 #define CCID_CLASS_TPDU 0x00010000 #define CCID_CLASS_SHORT_APDU 0x00020000 #define CCID_CLASS_EXTENDED_APDU 0x00040000 +#define CCID_CLASS_EXCHANGE_MASK 0x00070000 /* See CCID specs ch. 4.2.1 */ #define CCID_COMMAND_FAILED 0x40 /* 01 0000 00 */ Index: ccid_serial.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid_serial.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ccid_serial.c 27 Jan 2004 13:32:55 -0000 1.6 +++ ccid_serial.c 3 Feb 2004 15:43:51 -0000 1.7 @@ -535,6 +535,7 @@ serialDevice[reader].ccid.bSeq = 0; serialDevice[reader].ccid.readerID = GEMPCTWIN; serialDevice[reader].ccid.dwMaxCCIDMessageLength = 271; + serialDevice[reader].ccid.dwMaxIFSD = 254; serialDevice[reader].ccid.dwFeatures = 0x00010230; serialDevice[reader].buffer_offset = 0; Index: ccid_usb.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid_usb.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- ccid_usb.c 29 Jan 2004 10:33:52 -0000 1.14 +++ ccid_usb.c 3 Feb 2004 15:43:51 -0000 1.15 @@ -296,6 +296,7 @@ dev->descriptor.idProduct; usbDevice[reader].ccid.dwFeatures = dw2i(usb_interface->altsetting->extra, 40); usbDevice[reader].ccid.dwMaxCCIDMessageLength = dw2i(usb_interface->altsetting->extra, 44); + usbDevice[reader].ccid.dwMaxIFSD = dw2i(usb_interface->altsetting->extra, 28); goto end; } From rousseau@quantz.debian.org Tue Feb 3 15:44:54 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Tue, 03 Feb 2004 16:44:54 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src ifdhandler.c,1.13,1.14 ifdhandler.h,1.4,1.5 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv16009/src Modified Files: ifdhandler.c ifdhandler.h Log Message: add CardUp() and CardDown() for PowerOn and PowerOff actions Index: ifdhandler.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ifdhandler.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ifdhandler.c 29 Jan 2004 13:37:35 -0000 1.13 +++ ifdhandler.c 3 Feb 2004 15:44:52 -0000 1.14 @@ -28,6 +28,8 @@ #include "utils.h" #include "commands.h" #include "ccid.h" +#include "protocol_t1/atr.h" +#include "protocol_t1/pps.h" #ifdef HAVE_PTHREAD #include @@ -392,9 +394,7 @@ memcpy(CcidSlots[LunToReaderIndex(Lun)].pcATRBuffer, pcbuffer, *AtrLength); - /* set T=1 context */ - Protocol_T1_Init(&((get_ccid_slot(Lun)) -> t1), Lun); - + return_value = CardUp(Lun); break; case IFD_POWER_DOWN: @@ -408,9 +408,7 @@ /* send the command */ return_value = CmdPowerOff(Lun); - /* clear T=1 context */ - Protocol_T1_Close(&((get_ccid_slot(Lun)) -> t1)); - + return_value = CardDown(Lun); break; default: @@ -553,4 +551,78 @@ { return &CcidSlots[LunToReaderIndex(lun)]; } /* get_ccid_slot */ + + +RESPONSECODE CardUp(int lun) +{ + ATR atr; + BYTE protocol = ATR_PROTOCOL_TYPE_T0; + unsigned int np; + CcidDesc *ccid_slot = get_ccid_slot(lun); + _ccid_descriptor *ccid_desc = get_ccid_descriptor(lun); + + /* Get ATR of the card */ + ATR_InitFromArray(&atr, ccid_slot -> pcATRBuffer, ccid_slot -> nATRLength); + + ATR_GetNumberOfProtocols(&atr, &np); + + /* + * Get protocol offered by interface bytes T*2 if available, + * (that is, if TD1 is available), * otherwise use default T=0 + */ + if (np>1) + ATR_GetProtocolType(&atr, 2, &protocol); + + if ((protocol == ATR_PROTOCOL_TYPE_T1) && + (ccid_desc->dwFeatures & CCID_CLASS_TPDU)) + { + BYTE param[] = {0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}; + Protocol_T1 *t1 = &(ccid_slot -> t1); + + /* get TA1 */ + if (atr.ib[0][ATR_INTERFACE_BYTE_TA].present) + param[0] = atr.ib[0][ATR_INTERFACE_BYTE_TA].value; + + /* set T=1 context */ + Protocol_T1_Init(t1, lun); + + /* bloc size is limited by the reader */ + t1 -> ifsd = MIN(t1 -> ifsd, ccid_desc -> dwMaxIFSD); + + SetParameters(t1->lun, 1, 7, param); + } + + /* PPS not negociated by reader, and TA1 present */ + if (atr.ib[0][ATR_INTERFACE_BYTE_TA].present && + ! (ccid_desc->dwFeatures & CCID_CLASS_AUTO_PPS_CUR)) + { + Protocol_T1 *t1 = &(ccid_slot -> t1); + int len = 3; + BYTE pps[] = { + 0xFF, /* PTSS */ + 0x10, /* PTS0: PTS1 present */ + 0, /* PTS1 */ + 0}; /* PCK: will be calculated */ + + /* TD1: protocol */ + if (atr.ib[0][ATR_INTERFACE_BYTE_TD].present) + pps[1] |= (atr.ib[0][ATR_INTERFACE_BYTE_TD].value & 0x0F); + + /* TA1 */ + pps[2] = atr.ib[0][ATR_INTERFACE_BYTE_TA].value; + + PPS_Exchange(t1, pps, &len); + } + + return IFD_SUCCESS; +} /* CardUp */ + + +RESPONSECODE CardDown(int lun) +{ + /* clear T=1 context */ + Protocol_T1_Close(&((get_ccid_slot(lun)) -> t1)); + + return IFD_SUCCESS; +} /* CardUp */ Index: ifdhandler.h =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ifdhandler.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ifdhandler.h 15 Jan 2004 08:34:20 -0000 1.4 +++ ifdhandler.h 3 Feb 2004 15:44:52 -0000 1.5 @@ -134,6 +134,8 @@ RESPONSECODE IFDHICCPresence( DWORD ); CcidDesc *get_ccid_slot(int lun); + RESPONSECODE CardUp(int lun); + RESPONSECODE CardDown(int lun); #ifdef __cplusplus } From rousseau@quantz.debian.org Tue Feb 3 16:11:32 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Tue, 03 Feb 2004 17:11:32 +0100 Subject: [Pcsclite-cvs-commit] HandlerTest/Host handler_test.c,1.6,1.7 Message-ID: Update of /cvsroot/pcsclite/HandlerTest/Host In directory quantz:/tmp/cvs-serv23411 Modified Files: handler_test.c Log Message: device_name argument in IFDHCreateChannelByName() is now a command line argument Index: handler_test.c =================================================================== RCS file: /cvsroot/pcsclite/HandlerTest/Host/handler_test.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- handler_test.c 29 Jan 2004 14:19:05 -0000 1.6 +++ handler_test.c 3 Feb 2004 16:11:30 -0000 1.7 @@ -1,6 +1,6 @@ /* handler_test.c: main function used for IFDH debug - Copyright (C) 2001-2003 Ludovic Rousseau + Copyright (C) 2001-2004 Ludovic Rousseau This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,16 +35,12 @@ #define LUN 0 #define ENV_LIBNAME "LIB" -/* define DEVICE_NAME if yo want to use - * IFDHCreateChannelByName instead of IFDHCreateChannel */ -/* #define DEVICE_NAME "usb:08e6/3437" */ - #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif -int handler_test(int lun, int channel); +int handler_test(int lun, int channel, char device_name[]); void pcsc_error(int rv); int exchange(char *text, DWORD lun, SCARD_IO_HEADER SendPci, PSCARD_IO_HEADER RecvPci, @@ -104,7 +100,7 @@ void help(char *argv0) { - printf("\nUsage: %s [-f] [-t val] [-1] [-2] [-3] [-4] [-A] [-T] libname [channel]\n", argv0); + printf("\nUsage: %s [-f] [-t val] [-1] [-2] [-3] [-4] [-A] [-T] libname [channel|device_name]\n", argv0); printf(" -f : test APDU with every possible lengths\n"); printf(" -t val : use val as timerequest value. Set to 0 to avoid test\n"); printf(" -1 : test CASE 1 APDU\n"); @@ -115,7 +111,9 @@ printf(" -T : use TPDU\n"); printf(" -Z : use T=1 instead of default T=0\n"); printf(" libname : driver to load\n"); - printf(" channel : channel to use (for a serial driver)\n\n"); + printf(" channel : channel to use (for a serial driver)\n"); + printf(" device_name : name to use in IFDHCreateChannelByName\n"); + printf(" like usb:08e6/3437:libusb:001/038 or /dev/pcsc/1\n\n"); printf("example: %s /usr/lib/pcsc/drivers/serial/libGemPC410.so 2\n", argv0); printf(" to load the libGemPC410 and use /dev/pcsc/2\n"); @@ -132,6 +130,7 @@ int channel = 0; char *driver; int opt; + char *device_name = NULL; while ((opt = getopt(argc, argv, "ft:1234ATZ")) != EOF) { @@ -186,19 +185,28 @@ // driver driver = argv[optind]; - // channel + // channel or device_name if (argc - optind >= 2) + { channel = atoi(argv[optind+1]); + if (channel == 0) + device_name = argv[optind+1]; + } } else { // channel if (argc - optind >= 1) + { channel = atoi(argv[optind]); + if (channel == 0) + device_name = argv[optind]; + } } printf("Using driver: %s\n", driver); printf("Using channel: %d\n", channel); + printf("Using device_name: %s\n", device_name); lib_handle = dlopen(driver, RTLD_LAZY); if (lib_handle == NULL) @@ -214,13 +222,13 @@ DLSYM(IFDHTransmitToICC) DLSYM(IFDHICCPresence) - ret = handler_test(LUN, channel); + ret = handler_test(LUN, channel, device_name); dlclose(lib_handle); return ret; } /* main */ -int handler_test(int lun, int channel) +int handler_test(int lun, int channel, char device_name[]) { int rv, i, len_i, len_o; UCHAR atr[MAX_ATR_SIZE]; @@ -234,27 +242,30 @@ int time; int start, end; -#ifdef DEVICE_NAME - rv = f.IFDHCreateChannelByName(lun, DEVICE_NAME); - - if (rv != IFD_SUCCESS) + if (device_name) { - printf("IFDHCreateChannelByName: %d\n", rv); - printf("\nAre you sure a CCID reader is connected?\n"); - printf("and that you have read/write permission on the device?\n"); - return 1; - } -#else - rv = f.IFDHCreateChannel(lun, channel); + rv = f.IFDHCreateChannelByName(lun, device_name); - if (rv != IFD_SUCCESS) + if (rv != IFD_SUCCESS) + { + printf("IFDHCreateChannelByName: %d\n", rv); + printf("\nAre you sure a CCID reader is connected?\n"); + printf("and that you have read/write permission on the device?\n"); + return 1; + } + } + else { - printf("IFDHCreateChannel: %d\n", rv); - printf("\nAre you sure a CCID reader is connected?\n"); - printf("and that you have read/write permission on the device?\n"); - return 1; + rv = f.IFDHCreateChannel(lun, channel); + + if (rv != IFD_SUCCESS) + { + printf("IFDHCreateChannel: %d\n", rv); + printf("\nAre you sure a CCID reader is connected?\n"); + printf("and that you have read/write permission on the device?\n"); + return 1; + } } -#endif rv = f.IFDHICCPresence(LUN); pcsc_error(rv); From rousseau@quantz.debian.org Wed Feb 4 21:48:02 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Wed, 04 Feb 2004 22:48:02 +0100 Subject: [Pcsclite-cvs-commit] PCSC/src hotplug_linux.c,1.23,1.24 Message-ID: Update of /cvsroot/pcsclite/PCSC/src In directory quantz:/tmp/cvs-serv26291 Modified Files: hotplug_linux.c Log Message: DIR in --enable-usbdropdir=DIR may not finish by / in (deprecated) hotplug_linux.c Index: hotplug_linux.c =================================================================== RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_linux.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- hotplug_linux.c 20 Jan 2004 07:09:30 -0000 1.23 +++ hotplug_linux.c 4 Feb 2004 21:48:00 -0000 1.24 @@ -113,8 +113,8 @@ * The bundle exists - let's form a full path name and get the * vendor and product ID's for this particular bundle */ - snprintf(fullPath, FILENAME_MAX, "%s%s%s", PCSCLITE_HP_DROPDIR, - currFP->d_name, "/Contents/Info.plist"); + snprintf(fullPath, FILENAME_MAX, "%s/%s/Contents/Info.plist", + PCSCLITE_HP_DROPDIR, currFP->d_name); fullPath[FILENAME_MAX - 1] = '\0'; /* while we find a nth ifdVendorID in Info.plist */ From rousseau@quantz.debian.org Wed Feb 4 22:00:04 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Wed, 04 Feb 2004 23:00:04 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src debug.h,1.5,1.6 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv27233 Modified Files: debug.h Log Message: DEBUG_COMM4 was named DEBUG_COMM3 due to cut-n-paste Index: debug.h =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/debug.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- debug.h 3 Feb 2004 15:42:53 -0000 1.5 +++ debug.h 4 Feb 2004 22:00:01 -0000 1.6 @@ -95,7 +95,7 @@ #define DEBUG_COMM(fmt) #define DEBUG_COMM2(fmt, data) #define DEBUG_COMM3(fmt, data1, data2) -#define DEBUG_COMM3(fmt, data1, data2, data3) +#define DEBUG_COMM4(fmt, data1, data2, data3) #endif #ifndef DEBUG_XXD From rousseau@quantz.debian.org Thu Feb 5 19:41:00 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Thu, 05 Feb 2004 20:41:00 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid README,1.17,1.18 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid In directory quantz:/tmp/cvs-serv20074 Modified Files: README Log Message: add Silitek SK-3105 keyboard URL Index: README =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/README,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- README 2 Feb 2004 10:33:26 -0000 1.17 +++ README 5 Feb 2004 19:40:57 -0000 1.18 @@ -35,7 +35,7 @@ - SCM Micro SCR 331-DI [11] - SCM Micro SPR 532 [9] - ActivCard USB reader 2.0 [10] -- Silitek SK-3105 keyboard +- Silitek SK-3105 keyboard [12] Unsupported CCID readers: @@ -194,6 +194,7 @@ [9] http://www.scmmicro.com/security/SPR532.html [10] http://www.activcard.com/products/usb_reader.html [11] http://www.scmmicro.com/security/SCR331-DI.html +[12] http://www.silitek.com/prod/getProduct.do?xml_id=4_2&menu_id=4_2_8&cid=1_8_5 $Id$ From rousseau@quantz.debian.org Mon Feb 9 08:35:59 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 09 Feb 2004 09:35:59 +0100 Subject: [Pcsclite-cvs-commit] HandlerTest/Host handler_test.c,1.7,1.8 Message-ID: Update of /cvsroot/pcsclite/HandlerTest/Host In directory quantz:/tmp/cvs-serv29936 Modified Files: handler_test.c Log Message: exits only if IFDHCreateChannelByName is not defined (API 2.0) _and_ a device name is given Index: handler_test.c =================================================================== RCS file: /cvsroot/pcsclite/HandlerTest/Host/handler_test.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- handler_test.c 3 Feb 2004 16:11:30 -0000 1.7 +++ handler_test.c 9 Feb 2004 08:35:55 -0000 1.8 @@ -216,11 +216,17 @@ } DLSYM(IFDHCreateChannel) - DLSYM(IFDHCreateChannelByName) DLSYM(IFDHCloseChannel) DLSYM(IFDHPowerICC) DLSYM(IFDHTransmitToICC) DLSYM(IFDHICCPresence) + + f.IFDHCreateChannelByName = dlsym(lib_handle, "IFDHCreateChannelByName"); + if (f.IFDHCreateChannelByName == NULL && device_name) + { + printf("IFDHCreateChannelByName not defined by the driver and device_name set\n"); + return 1; + } ret = handler_test(LUN, channel, device_name); dlclose(lib_handle); From rousseau@quantz.debian.org Mon Feb 9 13:28:36 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 09 Feb 2004 14:28:36 +0100 Subject: [Pcsclite-cvs-commit] HandlerTest/Host handler_test.c,1.8,1.9 Message-ID: Update of /cvsroot/pcsclite/HandlerTest/Host In directory quantz:/tmp/cvs-serv15038 Modified Files: handler_test.c Log Message: allow to pass a device_name starting by numbers by explicitely selected a channel Index: handler_test.c =================================================================== RCS file: /cvsroot/pcsclite/HandlerTest/Host/handler_test.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- handler_test.c 9 Feb 2004 08:35:55 -0000 1.8 +++ handler_test.c 9 Feb 2004 13:28:33 -0000 1.9 @@ -195,12 +195,23 @@ } else { - // channel - if (argc - optind >= 1) + switch (argc - optind) { - channel = atoi(argv[optind]); - if (channel == 0) - device_name = argv[optind]; + // channel or device_name + case 1: + channel = atoi(argv[optind]); + if (channel == 0) + device_name = argv[optind]; + break; + + // channel and device_name + case 2: + channel = atoi(argv[optind]); + device_name = argv[optind+1]; + break; + + default: + help(argv[0]); } } From rousseau@quantz.debian.org Mon Feb 9 13:30:05 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 09 Feb 2004 14:30:05 +0100 Subject: [Pcsclite-cvs-commit] HandlerTest/Host handler_test.c,1.9,1.10 Message-ID: Update of /cvsroot/pcsclite/HandlerTest/Host In directory quantz:/tmp/cvs-serv15150 Modified Files: handler_test.c Log Message: update usage text Index: handler_test.c =================================================================== RCS file: /cvsroot/pcsclite/HandlerTest/Host/handler_test.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- handler_test.c 9 Feb 2004 13:28:33 -0000 1.9 +++ handler_test.c 9 Feb 2004 13:30:03 -0000 1.10 @@ -100,7 +100,7 @@ void help(char *argv0) { - printf("\nUsage: %s [-f] [-t val] [-1] [-2] [-3] [-4] [-A] [-T] libname [channel|device_name]\n", argv0); + printf("\nUsage: %s [-f] [-t val] [-1] [-2] [-3] [-4] [-A] [-T] [libname] [channel [device_name]|device_name]\n", argv0); printf(" -f : test APDU with every possible lengths\n"); printf(" -t val : use val as timerequest value. Set to 0 to avoid test\n"); printf(" -1 : test CASE 1 APDU\n"); From rousseau@quantz.debian.org Mon Feb 9 13:42:58 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 09 Feb 2004 14:42:58 +0100 Subject: [Pcsclite-cvs-commit] HandlerTest/Host handler_test.c,1.10,1.11 Message-ID: Update of /cvsroot/pcsclite/HandlerTest/Host In directory quantz:/tmp/cvs-serv17186 Modified Files: handler_test.c Log Message: 0 is a valid channel number (use sscanf instead of atoi) Index: handler_test.c =================================================================== RCS file: /cvsroot/pcsclite/HandlerTest/Host/handler_test.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- handler_test.c 9 Feb 2004 13:30:03 -0000 1.10 +++ handler_test.c 9 Feb 2004 13:42:56 -0000 1.11 @@ -187,11 +187,8 @@ // channel or device_name if (argc - optind >= 2) - { - channel = atoi(argv[optind+1]); - if (channel == 0) + if (sscanf(argv[optind+1], "%d", &channel) != 1) device_name = argv[optind+1]; - } } else { @@ -199,8 +196,7 @@ { // channel or device_name case 1: - channel = atoi(argv[optind]); - if (channel == 0) + if (sscanf(argv[optind], "%d", &channel) != 1) device_name = argv[optind]; break; From rousseau@quantz.debian.org Mon Feb 9 13:55:11 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 09 Feb 2004 14:55:11 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src ccid_usb.c,1.15,1.16 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv17583 Modified Files: ccid_usb.c Log Message: usb_reset() the device before usb_close() Index: ccid_usb.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid_usb.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ccid_usb.c 3 Feb 2004 15:43:51 -0000 1.15 +++ ccid_usb.c 9 Feb 2004 13:55:09 -0000 1.16 @@ -404,6 +404,7 @@ usb_release_interface(usbDevice[reader].handle, interface); + usb_reset(usbDevice[reader].handle); usb_close(usbDevice[reader].handle); /* mark the resource unused */ From rousseau@quantz.debian.org Mon Feb 9 13:57:17 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 09 Feb 2004 14:57:17 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src ccid_usb.c,1.16,1.17 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv17717 Modified Files: ccid_usb.c Log Message: first bSeq is 0 (even if 1 works ok) Index: ccid_usb.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid_usb.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ccid_usb.c 9 Feb 2004 13:55:09 -0000 1.16 +++ ccid_usb.c 9 Feb 2004 13:57:14 -0000 1.17 @@ -290,7 +290,7 @@ usbDevice[reader].dev = dev; /* CCID common informations */ - usbDevice[reader].ccid.bSeq = 1; + usbDevice[reader].ccid.bSeq = 0; usbDevice[reader].ccid.readerID = (dev->descriptor.idVendor << 16) + dev->descriptor.idProduct; From rousseau@quantz.debian.org Wed Feb 11 08:25:33 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Wed, 11 Feb 2004 09:25:33 +0100 Subject: [Pcsclite-cvs-commit] PCSC ChangeLog,1.16,1.17 Message-ID: Update of /cvsroot/pcsclite/PCSC In directory quantz:/tmp/cvs-serv13554 Modified Files: ChangeLog Log Message: merge 1.2.0 final branch Index: ChangeLog =================================================================== RCS file: /cvsroot/pcsclite/PCSC/ChangeLog,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ChangeLog 15 Oct 2003 20:32:34 -0000 1.16 +++ ChangeLog 11 Feb 2004 08:25:31 -0000 1.17 @@ -1,3 +1,7 @@ +pcsc-lite-1.2.0: Ludovic Rousseau +27 october, 2003 +- the 1.2.0 version is the same as 1.2.0-rc3 version + pcsc-lite-1.2.0-rc3: Ludovic Rousseau 15 october, 2003 - src/winscard_msg.c: perform a round-robbin among clients to avoid starvation From rousseau@quantz.debian.org Wed Feb 11 10:09:58 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Wed, 11 Feb 2004 11:09:58 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src ccid.h,1.2,1.3 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv635 Modified Files: ccid.h Log Message: add CCID_CLASS_AUTO_CONF_ATR Index: ccid.h =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ccid.h 3 Feb 2004 15:43:51 -0000 1.2 +++ ccid.h 11 Feb 2004 10:09:55 -0000 1.3 @@ -50,6 +50,7 @@ } _ccid_descriptor; +#define CCID_CLASS_AUTO_CONF_ATR 0x00000002 #define CCID_CLASS_AUTO_VOLTAGE 0x00000008 #define CCID_CLASS_AUTO_PPS_CUR 0x00000080 #define CCID_CLASS_TPDU 0x00010000 From rousseau@quantz.debian.org Wed Feb 11 10:10:31 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Wed, 11 Feb 2004 11:10:31 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src/protocol_t1 protocol_t1.h,1.1,1.2 protocol_t1.c,1.4,1.5 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1 In directory quantz:/tmp/cvs-serv880/protocol_t1 Modified Files: protocol_t1.h protocol_t1.c Log Message: add Protocol_T1_Negociate_IFSD() Index: protocol_t1.h =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/protocol_t1.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- protocol_t1.h 15 Jan 2004 14:34:21 -0000 1.1 +++ protocol_t1.h 11 Feb 2004 10:10:29 -0000 1.2 @@ -55,6 +55,10 @@ * Exported functions declaration */ +/* negociate IFSD */ +int +Protocol_T1_Negociate_IFSD(Protocol_T1 * t1, int ifsd); + /* Create a new protocol handler */ extern Protocol_T1 * Protocol_T1_New (void); Index: protocol_t1.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/protocol_t1.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- protocol_t1.c 3 Feb 2004 15:42:24 -0000 1.4 +++ protocol_t1.c 11 Feb 2004 10:10:29 -0000 1.5 @@ -64,6 +64,26 @@ */ int +Protocol_T1_Negociate_IFSD(Protocol_T1 * t1, int ifsd) +{ + T1_Block *sblock; + BYTE inf[1]; + + inf[0] = ifsd; + sblock = T1_Block_NewSBlock(T1_BLOCK_S_IFS_REQ, 1, inf); + + Protocol_T1_SendBlock(t1, sblock); + T1_Block_Delete(sblock); + + Protocol_T1_ReceiveBlock(t1, &sblock); + + DEBUG_XXD("data: ", sblock -> data, sblock -> length); + t1 -> ifsd = T1_Block_GetInf(sblock)[0]; + + return PROTOCOL_T1_OK; +} /* Protocol_T1_Negociate_IFSD */ + +int Protocol_T1_Init (Protocol_T1 * t1, int lun) { BYTE ta, tc; @@ -99,9 +119,6 @@ /* Set initial send sequence (NS) */ t1->ns = 1; - DEBUG_COMM4 ("T=1: IFSC=%d, IFSD=%d, EDC=%s\n", - t1->ifsc, t1->ifsd, (t1->edc == PROTOCOL_T1_EDC_LRC) ? "LRC" : "CRC"); - return PROTOCOL_T1_OK; } From rousseau@quantz.debian.org Wed Feb 11 10:12:03 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Wed, 11 Feb 2004 11:12:03 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src ifdhandler.c,1.14,1.15 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv1012 Modified Files: ifdhandler.c Log Message: use Protocol_T1_Negociate_IFSD() in CardUp() Index: ifdhandler.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ifdhandler.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- ifdhandler.c 3 Feb 2004 15:44:52 -0000 1.14 +++ ifdhandler.c 11 Feb 2004 10:12:00 -0000 1.15 @@ -30,6 +30,7 @@ #include "ccid.h" #include "protocol_t1/atr.h" #include "protocol_t1/pps.h" +#include "protocol_t1/protocol_t1.h" #ifdef HAVE_PTHREAD #include @@ -586,10 +587,12 @@ /* set T=1 context */ Protocol_T1_Init(t1, lun); - /* bloc size is limited by the reader */ - t1 -> ifsd = MIN(t1 -> ifsd, ccid_desc -> dwMaxIFSD); - SetParameters(t1->lun, 1, 7, param); + + /* negotiate IFSD */ + Protocol_T1_Negociate_IFSD(t1, ccid_desc -> dwMaxIFSD); + + DEBUG_COMM3("T=1: IFSC=%d, IFSD=%d", t1->ifsc, t1->ifsd); } /* PPS not negociated by reader, and TA1 present */ From rousseau@quantz.debian.org Wed Feb 11 10:12:50 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Wed, 11 Feb 2004 11:12:50 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src/protocol_t1 protocol_t1.c,1.5,1.6 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1 In directory quantz:/tmp/cvs-serv1060/protocol_t1 Modified Files: protocol_t1.c Log Message: remove debug message Index: protocol_t1.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/protocol_t1.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- protocol_t1.c 11 Feb 2004 10:10:29 -0000 1.5 +++ protocol_t1.c 11 Feb 2004 10:12:47 -0000 1.6 @@ -77,7 +77,6 @@ Protocol_T1_ReceiveBlock(t1, &sblock); - DEBUG_XXD("data: ", sblock -> data, sblock -> length); t1 -> ifsd = T1_Block_GetInf(sblock)[0]; return PROTOCOL_T1_OK; From rousseau@quantz.debian.org Wed Feb 11 14:33:06 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Wed, 11 Feb 2004 15:33:06 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src/protocol_t1 pps.c,1.2,1.3 pps.h,1.1,1.2 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1 In directory quantz:/tmp/cvs-serv10633/protocol_t1 Modified Files: pps.c pps.h Log Message: PPS_Exchange() now uses 'int lun' instead of 'Protocol_T1 * t1' Index: pps.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/pps.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pps.c 3 Feb 2004 15:42:24 -0000 1.2 +++ pps.c 11 Feb 2004 14:33:04 -0000 1.3 @@ -57,7 +57,7 @@ static BYTE PPS_GetPCK (BYTE * block, unsigned length); int -PPS_Exchange (Protocol_T1 * t1, BYTE * params, unsigned *length) +PPS_Exchange (int lun, BYTE * params, unsigned *length) { BYTE confirm[PPS_MAX_LENGTH]; unsigned len_request, len_confirm; @@ -69,12 +69,12 @@ DEBUG_XXD ("PPS: Sending request: ", params, len_request); /* Send PPS request */ - if (CCID_Transmit (t1->lun, len_request, params) != IFD_SUCCESS) + if (CCID_Transmit (lun, len_request, params) != IFD_SUCCESS) return PPS_ICC_ERROR; /* Get PPS confirm */ len_confirm = sizeof(confirm); - if (CCID_Receive (t1->lun, &len_confirm, confirm) != IFD_SUCCESS) + if (CCID_Receive (lun, &len_confirm, confirm) != IFD_SUCCESS) return PPS_ICC_ERROR; len_confirm = PPS_GetLength (confirm); Index: pps.h =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/pps.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- pps.h 15 Jan 2004 14:34:21 -0000 1.1 +++ pps.h 11 Feb 2004 14:33:04 -0000 1.2 @@ -59,6 +59,6 @@ * Exported functions declaration */ -int PPS_Exchange (Protocol_T1 * t1, BYTE * params, unsigned *length); +int PPS_Exchange (int lun, BYTE * params, unsigned *length); #endif /* _PPS_ */ From rousseau@quantz.debian.org Wed Feb 11 14:36:08 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Wed, 11 Feb 2004 15:36:08 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src/protocol_t1 protocol_t1.c,1.6,1.7 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1 In directory quantz:/tmp/cvs-serv11313/protocol_t1 Modified Files: protocol_t1.c Log Message: add return code tests in Protocol_T1_Negociate_IFSD() Index: protocol_t1.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/protocol_t1.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- protocol_t1.c 11 Feb 2004 10:12:47 -0000 1.6 +++ protocol_t1.c 11 Feb 2004 14:36:05 -0000 1.7 @@ -60,7 +60,7 @@ Protocol_T1_ReceiveBlock (Protocol_T1 * t1, T1_Block ** block); /* - * Exproted funtions definition + * Exported funtions definition */ int @@ -68,16 +68,19 @@ { T1_Block *sblock; BYTE inf[1]; + int ret; inf[0] = ifsd; sblock = T1_Block_NewSBlock(T1_BLOCK_S_IFS_REQ, 1, inf); - Protocol_T1_SendBlock(t1, sblock); + ret = Protocol_T1_SendBlock(t1, sblock); T1_Block_Delete(sblock); + if (PROTOCOL_T1_OK != ret) + return ret; - Protocol_T1_ReceiveBlock(t1, &sblock); - - t1 -> ifsd = T1_Block_GetInf(sblock)[0]; + if (PROTOCOL_T1_OK == Protocol_T1_ReceiveBlock(t1, &sblock)) + t1 -> ifsd = T1_Block_GetInf(sblock)[0]; + T1_Block_Delete(sblock); return PROTOCOL_T1_OK; } /* Protocol_T1_Negociate_IFSD */ @@ -328,8 +331,6 @@ /* Receive T=1 block */ if (CCID_Receive(t1->lun, &len, cmd) != IFD_SUCCESS) { - if (len >= ERROR_OFFSET) - ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__); /* bError */ ret = PROTOCOL_T1_ICC_ERROR; (*block) = NULL; } From rousseau@quantz.debian.org Wed Feb 11 14:37:02 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Wed, 11 Feb 2004 15:37:02 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src ccid.h,1.3,1.4 ifdhandler.c,1.15,1.16 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv11346 Modified Files: ccid.h ifdhandler.c Log Message: Index: ccid.h =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ccid.h 11 Feb 2004 10:09:55 -0000 1.3 +++ ccid.h 11 Feb 2004 14:36:59 -0000 1.4 @@ -52,7 +52,9 @@ #define CCID_CLASS_AUTO_CONF_ATR 0x00000002 #define CCID_CLASS_AUTO_VOLTAGE 0x00000008 +#define CCID_CLASS_AUTO_BAUD 0x00000020 #define CCID_CLASS_AUTO_PPS_CUR 0x00000080 +#define CCID_CLASS_AUTO_IFSD 0x00000400 #define CCID_CLASS_TPDU 0x00010000 #define CCID_CLASS_SHORT_APDU 0x00020000 #define CCID_CLASS_EXTENDED_APDU 0x00040000 Index: ifdhandler.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ifdhandler.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ifdhandler.c 11 Feb 2004 10:12:00 -0000 1.15 +++ ifdhandler.c 11 Feb 2004 14:36:59 -0000 1.16 @@ -567,13 +567,36 @@ ATR_GetNumberOfProtocols(&atr, &np); + /* PPS not negociated by reader, and TA1 present */ + if (atr.ib[0][ATR_INTERFACE_BYTE_TA].present && + ! (ccid_desc->dwFeatures & CCID_CLASS_AUTO_PPS_CUR) && + ! (ccid_desc->dwFeatures & CCID_CLASS_AUTO_BAUD)) + { + int len = 3; + BYTE pps[] = { + 0xFF, /* PTSS */ + 0x10, /* PTS0: PTS1 present */ + 0, /* PTS1 */ + 0}; /* PCK: will be calculated */ + + /* TD1: protocol */ + if (atr.ib[0][ATR_INTERFACE_BYTE_TD].present) + pps[1] |= (atr.ib[0][ATR_INTERFACE_BYTE_TD].value & 0x0F); + + /* PTS1 = TA1 */ + pps[2] = atr.ib[0][ATR_INTERFACE_BYTE_TA].value; + + PPS_Exchange(lun, pps, &len); + } + /* * Get protocol offered by interface bytes T*2 if available, - * (that is, if TD1 is available), * otherwise use default T=0 + * (that is, if TD1 is available), otherwise use default T=0 */ if (np>1) ATR_GetProtocolType(&atr, 2, &protocol); + /* SetParameters and negociate IFSD */ if ((protocol == ATR_PROTOCOL_TYPE_T1) && (ccid_desc->dwFeatures & CCID_CLASS_TPDU)) { @@ -588,33 +611,17 @@ Protocol_T1_Init(t1, lun); SetParameters(t1->lun, 1, 7, param); - - /* negotiate IFSD */ - Protocol_T1_Negociate_IFSD(t1, ccid_desc -> dwMaxIFSD); - - DEBUG_COMM3("T=1: IFSC=%d, IFSD=%d", t1->ifsc, t1->ifsd); } - /* PPS not negociated by reader, and TA1 present */ - if (atr.ib[0][ATR_INTERFACE_BYTE_TA].present && - ! (ccid_desc->dwFeatures & CCID_CLASS_AUTO_PPS_CUR)) + /* negotiate IFSD in T=1 */ + if ((protocol == ATR_PROTOCOL_TYPE_T1) && + ! (ccid_desc->dwFeatures & CCID_CLASS_AUTO_IFSD)) { Protocol_T1 *t1 = &(ccid_slot -> t1); - int len = 3; - BYTE pps[] = { - 0xFF, /* PTSS */ - 0x10, /* PTS0: PTS1 present */ - 0, /* PTS1 */ - 0}; /* PCK: will be calculated */ - - /* TD1: protocol */ - if (atr.ib[0][ATR_INTERFACE_BYTE_TD].present) - pps[1] |= (atr.ib[0][ATR_INTERFACE_BYTE_TD].value & 0x0F); - /* TA1 */ - pps[2] = atr.ib[0][ATR_INTERFACE_BYTE_TA].value; + Protocol_T1_Negociate_IFSD(t1, ccid_desc -> dwMaxIFSD); - PPS_Exchange(t1, pps, &len); + DEBUG_COMM3("T=1: IFSC=%d, IFSD=%d", t1->ifsc, t1->ifsd); } return IFD_SUCCESS; From rousseau@quantz.debian.org Thu Feb 12 16:08:47 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Thu, 12 Feb 2004 17:08:47 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src ccid.h,1.4,1.5 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv26177/src Modified Files: ccid.h Log Message: add dwDefaultClock and dwMaxDataRate fields Index: ccid.h =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ccid.h 11 Feb 2004 14:36:59 -0000 1.4 +++ ccid.h 12 Feb 2004 16:08:45 -0000 1.5 @@ -48,6 +48,16 @@ */ int dwFeatures; + /* + * Default Clock + */ + int dwDefaultClock; + + /* + * Max Data Rate + */ + int dwMaxDataRate; + } _ccid_descriptor; #define CCID_CLASS_AUTO_CONF_ATR 0x00000002 @@ -69,6 +79,7 @@ #define GEMPCKEY 0x08E63438 #define GEMPCTWIN 0x08E63437 #define CARDMAN3121 0x076B3021 +#define LTC31 0x07830003 /* Escape sequence codes */ #define ESC_GEMPC_SET_ISO_MODE 1 From rousseau@quantz.debian.org Thu Feb 12 16:09:34 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Thu, 12 Feb 2004 17:09:34 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src ccid_serial.c,1.7,1.8 ccid_usb.c,1.17,1.18 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv26199/src Modified Files: ccid_serial.c ccid_usb.c Log Message: fill dwDefaultClock and dwMaxDataRate according to the reader descriptor Index: ccid_serial.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid_serial.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ccid_serial.c 3 Feb 2004 15:43:51 -0000 1.7 +++ ccid_serial.c 12 Feb 2004 16:09:32 -0000 1.8 @@ -537,6 +537,8 @@ serialDevice[reader].ccid.dwMaxCCIDMessageLength = 271; serialDevice[reader].ccid.dwMaxIFSD = 254; serialDevice[reader].ccid.dwFeatures = 0x00010230; + serialDevice[reader].ccid.dwDefaultClock = 4000; + serialDevice[reader].ccid.dwMaxDataRate = 344086; serialDevice[reader].buffer_offset = 0; serialDevice[reader].buffer_offset_last = 0; Index: ccid_usb.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid_usb.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- ccid_usb.c 9 Feb 2004 13:57:14 -0000 1.17 +++ ccid_usb.c 12 Feb 2004 16:09:32 -0000 1.18 @@ -124,8 +124,6 @@ DEBUG_CRITICAL2("device name can't be parsed: %s", device); return STATUS_UNSUCCESSFUL; } - - printf("%x %x\n", device_vendor, device_product); } if (busses == NULL) @@ -297,6 +295,8 @@ usbDevice[reader].ccid.dwFeatures = dw2i(usb_interface->altsetting->extra, 40); usbDevice[reader].ccid.dwMaxCCIDMessageLength = dw2i(usb_interface->altsetting->extra, 44); usbDevice[reader].ccid.dwMaxIFSD = dw2i(usb_interface->altsetting->extra, 28); + usbDevice[reader].ccid.dwDefaultClock = dw2i(usb_interface->altsetting->extra, 10); + usbDevice[reader].ccid.dwMaxDataRate = dw2i(usb_interface->altsetting->extra, 23); goto end; } From rousseau@quantz.debian.org Thu Feb 12 16:11:10 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Thu, 12 Feb 2004 17:11:10 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src/protocol_t1 protocol_t1.c,1.7,1.8 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1 In directory quantz:/tmp/cvs-serv26521/src/protocol_t1 Modified Files: protocol_t1.c Log Message: return with a error if the received bloc in less than 4 bytes (T=0 error response for example) Index: protocol_t1.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/protocol_t1.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- protocol_t1.c 11 Feb 2004 14:36:05 -0000 1.7 +++ protocol_t1.c 12 Feb 2004 16:11:08 -0000 1.8 @@ -79,8 +79,10 @@ return ret; if (PROTOCOL_T1_OK == Protocol_T1_ReceiveBlock(t1, &sblock)) + { t1 -> ifsd = T1_Block_GetInf(sblock)[0]; - T1_Block_Delete(sblock); + T1_Block_Delete(sblock); + } return PROTOCOL_T1_OK; } /* Protocol_T1_Negociate_IFSD */ @@ -329,7 +331,7 @@ int len = sizeof(cmd); /* Receive T=1 block */ - if (CCID_Receive(t1->lun, &len, cmd) != IFD_SUCCESS) + if ((CCID_Receive(t1->lun, &len, cmd) != IFD_SUCCESS) || (len < 4)) { ret = PROTOCOL_T1_ICC_ERROR; (*block) = NULL; From rousseau@quantz.debian.org Thu Feb 12 16:11:47 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Thu, 12 Feb 2004 17:11:47 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src ifdhandler.c,1.16,1.17 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv26551/src Modified Files: ifdhandler.c Log Message: huge rework of CardUp() Index: ifdhandler.c =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ifdhandler.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ifdhandler.c 11 Feb 2004 14:36:59 -0000 1.16 +++ ifdhandler.c 12 Feb 2004 16:11:45 -0000 1.17 @@ -569,24 +569,40 @@ /* PPS not negociated by reader, and TA1 present */ if (atr.ib[0][ATR_INTERFACE_BYTE_TA].present && - ! (ccid_desc->dwFeatures & CCID_CLASS_AUTO_PPS_CUR) && - ! (ccid_desc->dwFeatures & CCID_CLASS_AUTO_BAUD)) + ! (ccid_desc->dwFeatures & CCID_CLASS_AUTO_PPS_CUR)) { - int len = 3; - BYTE pps[] = { - 0xFF, /* PTSS */ - 0x10, /* PTS0: PTS1 present */ - 0, /* PTS1 */ - 0}; /* PCK: will be calculated */ + unsigned int baudrate; + double f, d; - /* TD1: protocol */ - if (atr.ib[0][ATR_INTERFACE_BYTE_TD].present) - pps[1] |= (atr.ib[0][ATR_INTERFACE_BYTE_TD].value & 0x0F); + ATR_GetParameter(&atr, ATR_PARAMETER_D, &d); + ATR_GetParameter(&atr, ATR_PARAMETER_F, &f); - /* PTS1 = TA1 */ - pps[2] = atr.ib[0][ATR_INTERFACE_BYTE_TA].value; + /* Baudrate = f x D/F */ + baudrate = (unsigned int) (1000 * ccid_desc->dwDefaultClock * d / f); - PPS_Exchange(lun, pps, &len); + /* if the reader is fast enough */ + if (baudrate < ccid_desc->dwMaxDataRate) + { + int len = 3; + BYTE pps[] = { + 0xFF, /* PTSS */ + 0x10, /* PTS0: PTS1 present */ + 0, /* PTS1 */ + 0}; /* PCK: will be calculated */ + + /* TD1: protocol */ + if (atr.ib[0][ATR_INTERFACE_BYTE_TD].present) + pps[1] |= (atr.ib[0][ATR_INTERFACE_BYTE_TD].value & 0x0F); + + /* PTS1 = TA1 */ + pps[2] = atr.ib[0][ATR_INTERFACE_BYTE_TA].value; + + PPS_Exchange(lun, pps, &len); + } + else + { + DEBUG_INFO3("The reader is too slow (%d bauds) for the card (%d bauds)", ccid_desc->dwMaxDataRate, baudrate); + } } /* @@ -596,22 +612,63 @@ if (np>1) ATR_GetProtocolType(&atr, 2, &protocol); - /* SetParameters and negociate IFSD */ - if ((protocol == ATR_PROTOCOL_TYPE_T1) && - (ccid_desc->dwFeatures & CCID_CLASS_TPDU)) + /* SetParameters */ + //if (! (ccid_desc->dwFeatures & CCID_CLASS_AUTO_BAUD)) { - BYTE param[] = {0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}; - Protocol_T1 *t1 = &(ccid_slot -> t1); + int convention; - /* get TA1 */ - if (atr.ib[0][ATR_INTERFACE_BYTE_TA].present) - param[0] = atr.ib[0][ATR_INTERFACE_BYTE_TA].value; + ATR_GetConvention(&atr, &convention); - /* set T=1 context */ - Protocol_T1_Init(t1, lun); + /* T=1 */ + if (protocol == ATR_PROTOCOL_TYPE_T1) + { + BYTE param[] = {0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}; + Protocol_T1 *t1 = &(ccid_slot -> t1); - SetParameters(t1->lun, 1, 7, param); + /* get TA1 Fi/Di */ + if (atr.ib[0][ATR_INTERFACE_BYTE_TA].present) + param[0] = atr.ib[0][ATR_INTERFACE_BYTE_TA].value; + + if (convention == ATR_CONVENTION_INVERSE) + param[1] &= 0x02; + + /* get TC1 Extra guard time */ + if (atr.ib[0][ATR_INTERFACE_BYTE_TC].present) + param[2] = atr.ib[0][ATR_INTERFACE_BYTE_TC].value; + + /* get TB3 BWI/BCI */ + if (atr.ib[2][ATR_INTERFACE_BYTE_TB].present) + param[3] = atr.ib[2][ATR_INTERFACE_BYTE_TB].value; + + /* set T=1 context */ + Protocol_T1_Init(t1, lun); + + SetParameters(lun, 1, sizeof(param), param); + } + else + /* T=0 */ + { + BYTE param[] = {0x00, 0x00, 0x00, 0x0a, 0x00}; + + /* get TA1 Fi/Di */ + if (atr.ib[0][ATR_INTERFACE_BYTE_TA].present) + param[0] = atr.ib[0][ATR_INTERFACE_BYTE_TA].value; + + if (convention == ATR_CONVENTION_INVERSE) + param[1] &= 0x02; + + /* get TC1 Extra guard time */ + if (atr.ib[0][ATR_INTERFACE_BYTE_TC].present) + param[2] = atr.ib[0][ATR_INTERFACE_BYTE_TC].value; + + /* TC2 WWT */ + if (atr.ib[1][ATR_INTERFACE_BYTE_TC].present) + param[3] = atr.ib[1][ATR_INTERFACE_BYTE_TC].value; + + SetParameters(lun, 0, sizeof(param), param); + } } + /* negotiate IFSD in T=1 */ if ((protocol == ATR_PROTOCOL_TYPE_T1) && From rousseau@quantz.debian.org Fri Feb 13 07:57:28 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Fri, 13 Feb 2004 08:57:28 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid README,1.18,1.19 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid In directory quantz:/tmp/cvs-serv31579 Modified Files: README Log Message: release 0.4.0 Index: README =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/README,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- README 5 Feb 2004 19:40:57 -0000 1.18 +++ README 13 Feb 2004 07:57:25 -0000 1.19 @@ -6,10 +6,11 @@ specifications from the USB working group. -Author: -======= +Authors: +======== - Ludovic Rousseau +- Carlos Prados for the TPDU T=1 code (taken from his towitoto driver) Supported CCID readers: @@ -56,14 +57,6 @@ =============== All platforms - T=1 and TPDU - """""""""""" - I do not yet included support of T=1 cards when the reader is in - TPDU mode. - If you have a T=1 card I recommand you to use a reader working in - APDU mode. T=1 and TPDU will be supported in a future version of - the driver. - readers enumeration """"""""""""""""""" You may have wrong reader identification if you connect two or @@ -128,6 +121,35 @@ History: ======== + +0.4.0 - 13 February 2004, Ludovic Rousseau + - support of T=1 with TPDU readers. A lot of the T=1 code comes from + Carlos Prados towitoko driver. + My code is GNU GPL, his code is GNU LGPL so the global driver is + GNU GPL + - PPS negotiation if the reader does not do it automatically + - add support for the Silitek SK-3105 keyboard. It's a USB device + with multiple interfaces + - use the create_Info_plist.pl script to generate the installed + Info.plist from an Info.plist template and a list of supported + readers. The Info.plist was too "complex" to maintain by hand + since it now contains 11 entries + - add support of IFDHCreateChannelByName to avoid wrong reader + enumeration. This is not complete if you have multiple _identical_ + readers. You need to use a > 1.2.0 pcsc-lite version (not yet + released at that time) + - build but do not install the serial ccidtwin driver by default + since it is useless on computers without a serial port or without + this reader for example. + - read and write timeouts are not symmetric. write timout can be + shorter since the reader and card is not supposed to do anything + before receiving (write) a command + - do not try to find usb.h and other libusb files if + --disable-libusb is used. Needed if you only want to build the + serial driver. Thanks to Niki Waibel for the patch + - add a --enable-ccidtwindir argument to ./configure to specify the + serial GemPC Twin installation directory + - debug and code improvements and simplifications 0.3.2 - 4 November 2003, Ludovic Rousseau - src/commands.c: correct a stupid bug that occurs with an APDU with From rousseau@quantz.debian.org Fri Feb 13 07:58:24 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Fri, 13 Feb 2004 08:58:24 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid configure.in,1.12,1.13 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid In directory quantz:/tmp/cvs-serv31675 Modified Files: configure.in Log Message: version 0.4.0 Index: configure.in =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/configure.in,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- configure.in 25 Nov 2003 23:10:59 -0000 1.12 +++ configure.in 13 Feb 2004 07:58:21 -0000 1.13 @@ -6,7 +6,7 @@ dnl Require autoconf 2.52 AC_PREREQ(2.52) -AC_INIT(ccid, 0.3.2) +AC_INIT(ccid, 0.4.0) AC_CONFIG_SRCDIR(src/ifdhandler.c) AC_CONFIG_AUX_DIR(build) AM_INIT_AUTOMAKE From rousseau@quantz.debian.org Sat Feb 14 12:26:11 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Sat, 14 Feb 2004 13:26:11 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/src Makefile.am,1.10,1.11 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/src In directory quantz:/tmp/cvs-serv19894/src Modified Files: Makefile.am Log Message: disribute create_Info_plist.pl Index: Makefile.am =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/src/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile.am 2 Feb 2004 10:05:34 -0000 1.10 +++ Makefile.am 14 Feb 2004 12:26:09 -0000 1.11 @@ -46,7 +46,7 @@ parse_SOURCES = tokenparser.l parse.c parser.h parse_LDADD = libccid.la -EXTRA_DIST = Info.plist reader.conf.in +EXTRA_DIST = Info.plist create_Info_plist.pl reader.conf.in tokenparser_macosx.l: tokenparser.l cp -f $^ $@ From rousseau@quantz.debian.org Sat Feb 14 12:26:37 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Sat, 14 Feb 2004 13:26:37 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/readers Makefile.am,1.2,1.3 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/readers In directory quantz:/tmp/cvs-serv19931/readers Modified Files: Makefile.am Log Message: distribute SCR331-DI.txt and supported_readers.txt Index: Makefile.am =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/readers/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 3 Nov 2003 16:08:48 -0000 1.2 +++ Makefile.am 14 Feb 2004 12:26:34 -0000 1.3 @@ -1,5 +1,6 @@ # $Id$ EXTRA_DIST = CardMan3121.txt GemPC433_SL.txt GemPCKey.txt GemPCTwin.txt \ - LTC31.txt SCR331.txt SCR335.txt SPR532.txt + LTC31.txt SCR331-DI.txt SCR331.txt SCR335.txt SPR532.txt \ + supported_readers.txt From rousseau@quantz.debian.org Sat Feb 14 12:26:58 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Sat, 14 Feb 2004 13:26:58 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid configure.in,1.13,1.14 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid In directory quantz:/tmp/cvs-serv19956 Modified Files: configure.in Log Message: version 0.4.1 Index: configure.in =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/configure.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- configure.in 13 Feb 2004 07:58:21 -0000 1.13 +++ configure.in 14 Feb 2004 12:26:56 -0000 1.14 @@ -6,7 +6,7 @@ dnl Require autoconf 2.52 AC_PREREQ(2.52) -AC_INIT(ccid, 0.4.0) +AC_INIT(ccid, 0.4.1) AC_CONFIG_SRCDIR(src/ifdhandler.c) AC_CONFIG_AUX_DIR(build) AM_INIT_AUTOMAKE From rousseau@quantz.debian.org Sat Feb 14 12:46:20 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Sat, 14 Feb 2004 13:46:20 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid README,1.19,1.20 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid In directory quantz:/tmp/cvs-serv21635 Modified Files: README Log Message: release 0.4.1 Index: README =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/README,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- README 13 Feb 2004 07:57:25 -0000 1.19 +++ README 14 Feb 2004 12:46:18 -0000 1.20 @@ -122,6 +122,11 @@ History: ======== +0.4.1 - 14 February 2004, Ludovic Rousseau + - distribute missing files readers/supported_readers.txt and + src/create_Info_plist.pl + 'make install' failed because of this. + 0.4.0 - 13 February 2004, Ludovic Rousseau - support of T=1 with TPDU readers. A lot of the T=1 code comes from Carlos Prados towitoko driver. From rousseau@quantz.debian.org Sun Feb 15 17:03:54 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Sun, 15 Feb 2004 18:03:54 +0100 Subject: [Pcsclite-cvs-commit] muscleTools/man muscleTool.1,1.1,1.2 Message-ID: Update of /cvsroot/muscleapps/muscleTools/man In directory quantz:/tmp/cvs-serv12611/man Modified Files: muscleTool.1 Log Message: add unblock command to "Unblock a PIN". Thanks to Martin Buechler for the patch Index: muscleTool.1 =================================================================== RCS file: /cvsroot/muscleapps/muscleTools/man/muscleTool.1,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- muscleTool.1 26 Sep 2002 21:23:53 -0000 1.1 +++ muscleTool.1 15 Feb 2004 17:03:52 -0000 1.2 @@ -65,6 +65,9 @@ .B changepin Change a PIN .IP +.B unblock +Unblock a PIN +.IP .B listpins List the PINs .PP From rousseau@quantz.debian.org Sun Feb 15 17:03:54 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Sun, 15 Feb 2004 18:03:54 +0100 Subject: [Pcsclite-cvs-commit] muscleTools muscleTool.c,1.32,1.33 Message-ID: Update of /cvsroot/muscleapps/muscleTools In directory quantz:/tmp/cvs-serv12611 Modified Files: muscleTool.c Log Message: add unblock command to "Unblock a PIN". Thanks to Martin Buechler for the patch Index: muscleTool.c =================================================================== RCS file: /cvsroot/muscleapps/muscleTools/muscleTool.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- muscleTool.c 28 Nov 2003 14:47:21 -0000 1.32 +++ muscleTool.c 15 Feb 2004 17:03:52 -0000 1.33 @@ -214,6 +214,7 @@ printf(" verify - Verify a PIN +\n"); printf(" makepin - Create a PIN\n"); printf(" changepin - Change a PIN\n"); + printf(" unblock - Unblock a PIN\n"); printf(" listpins - List the PINs\n"); printf("\n"); printf(" Key related functions \n"); @@ -918,6 +919,44 @@ return; } +void doUnblockPIN() { + + MSCLong32 rv; + MSCString arg2; + MSCString arg3; + MSCUChar8 pinNumber; + MSCULong32 pinSize; + MSCUChar8 pinData[128]; + + CHECK_ERR(pConnection == 0, "Must Connect First !"); + + arg2 = strtok(NULL, " "); + + if ( arg2 ) { + pinNumber = strtoul(arg2, 0, 10); + + arg3 = strtok(NULL, " "); + if (arg3 == NULL) { + printf("ERR: Invalid Use: unblock [number] [value]\n"); + return; + } + + pinSize = strlen(arg3); + + CHECK_ERR(pinSize > sizeof(pinData), "ERR: Invalid PIN Code !\n"); + memcpy(pinData, arg3, pinSize); + } else { + printf("ERR: Invalid Use: unblock [number] [value]\n"); + return; + } + + rv = MSCUnblockPIN(pConnection, pinNumber, pinData, pinSize); + CHECK_ERR(rv != MSC_SUCCESS, "UnblockPIN Failed !"); + printf("PIN Unblock Successful\n"); + + return; +} + void doMakePIN() { MSCLong32 rv; @@ -1830,6 +1869,8 @@ doListPIN(); } else if (strcmp(arg1, "changepin") == 0) { doChangePIN(); + } else if (strcmp(arg1, "unblock") == 0) { + doUnblockPIN(); } else if (strcmp(arg1, "create") == 0) { doCreate(); } else if (strcmp(arg1, "delete") == 0) { From rousseau@quantz.debian.org Mon Feb 23 09:57:31 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Mon, 23 Feb 2004 10:57:31 +0100 Subject: [Pcsclite-cvs-commit] PCSC/src hotplug_libusb.c,1.20,1.21 Message-ID: Update of /cvsroot/pcsclite/PCSC/src In directory quantz:/tmp/cvs-serv25256/src Modified Files: hotplug_libusb.c Log Message: use deviceName defineid as usb:idVendor/idProduct:libusb:busname:filename in HPAddHotPluggable(). This should avoid wrong USB enumeration when used in IFDHCreateChannelByName() Index: hotplug_libusb.c =================================================================== RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_libusb.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- hotplug_libusb.c 16 Jan 2004 11:26:18 -0000 1.20 +++ hotplug_libusb.c 23 Feb 2004 09:57:29 -0000 1.21 @@ -322,38 +322,9 @@ return 0; } -static LONG HPGetDeviceName(LPSTR deviceName, struct usb_device *dev) -{ -#ifdef __linux__ -#define LINUX_USB_PATH "/proc/bus/usb" - - struct stat fStatBuf; - - if ((SYS_Stat(LINUX_USB_PATH, &fStatBuf) == 0) && S_ISDIR(fStatBuf.st_mode)) - { - snprintf(deviceName, MAX_DEVICENAME, "%s/%s/%s", LINUX_USB_PATH, dev->bus->dirname, dev->filename); - } - else - { - DebugLogA("No USB VFS found"); - return 1; - } -#else -#ifdef __FreeBSD__ - snprintf(deviceName, MAX_DEVICENAME, "%s", dev->filename); -#else - snprintf(deviceName, MAX_DEVICENAME, "%s.00", dev->filename); -#endif -#endif - DebugLogB("The fullname for this device is: %s", deviceName); - - return 0; -} - LONG HPAddHotPluggable(struct usb_device *dev, const char bus_device[], struct _driverTracker *driver) { - LONG rv; int i; char deviceName[MAX_DEVICENAME]; @@ -361,37 +332,36 @@ DebugLogB("Adding USB device: %s", bus_device); - rv = HPGetDeviceName(deviceName, dev); + snprintf(deviceName, sizeof(deviceName), "usb:%04x/%04x:libusb:%s", + dev->descriptor.idVendor, dev->descriptor.idProduct, bus_device); + deviceName[sizeof(deviceName)] = '\0'; - if (rv == 0) - { - /* find a free entry */ - for (i=0; ireaderName, PCSCLITE_HP_BASE_PORT + i, - driver->libraryPath, deviceName) == SCARD_S_SUCCESS) - { - strncpy(readerTracker[i].bus_device, bus_device, BUS_DEVICE_STRSIZE); - readerTracker[i].bus_device[BUS_DEVICE_STRSIZE - 1] = '\0'; - - readerTracker[i].status = READER_PRESENT; - readerTracker[i].driver = driver; - } + if (i==PCSCLITE_MAX_READERS_CONTEXTS) + { + DebugLogB("Not enough reader entries. Already found %d readers", i); + return 0; + } + + if (RFAddReader(driver->readerName, PCSCLITE_HP_BASE_PORT + i, + driver->libraryPath, deviceName) == SCARD_S_SUCCESS) + { + strncpy(readerTracker[i].bus_device, bus_device, BUS_DEVICE_STRSIZE); + readerTracker[i].bus_device[BUS_DEVICE_STRSIZE - 1] = '\0'; + + readerTracker[i].status = READER_PRESENT; + readerTracker[i].driver = driver; } SYS_MutexUnLock(&usbNotifierMutex); - return rv; + return 1; } /* End of function */ LONG HPRemoveHotPluggable(int index) From rousseau@quantz.debian.org Tue Feb 24 21:16:53 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Tue, 24 Feb 2004 22:16:53 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid Makefile.am,1.6,1.7 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid In directory quantz:/tmp/cvs-serv23508 Modified Files: Makefile.am Log Message: use a shorter Perl script to convert generate/convert ChangeLog Index: Makefile.am =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.am 25 Nov 2003 22:55:57 -0000 1.6 +++ Makefile.am 24 Feb 2004 21:16:51 -0000 1.7 @@ -17,7 +17,7 @@ $(AUX_DIST) MAINTAINERCLEANFILES = $(AUX_DIST) -DISTCLEANFILES = ChangeLog.cvs +DISTCLEANFILES = ChangeLog # Automatically update the libtool script if it becomes out-of-date. LIBTOOL_DEPS = @LIBTOOL_DEPS@ @@ -25,8 +25,8 @@ $(SHELL) ./config.status --recheck ChangeLog: - rcs2log | perl -e 'while (<>) { s/rousseau /Ludovic Rousseau /; \ - s+/cvsroot/pcsclite/PCSC/++g; print ; }' > $@ + rcs2log | perl -pe 's/rousseau /Ludovic Rousseau /; \ + s+/cvsroot/pcsclite/PCSC/++g;' > $@ -.PHONY: ChangeLog.cvs +.PHONY: ChangeLog From rousseau@quantz.debian.org Fri Feb 27 17:25:01 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Fri, 27 Feb 2004 18:25:01 +0100 Subject: [Pcsclite-cvs-commit] PKCS11/src p11_sign.c,1.13,1.14 Message-ID: Update of /cvsroot/muscleapps/PKCS11/src In directory quantz:/tmp/cvs-serv18404 Modified Files: p11_sign.c Log Message: in C_Sign() do not return CKR_ARGUMENTS_BAD if pSignature is NULL but returns the needed size in *pulSignatureLen. Closes [ #300533 ] C_Sign bug Index: p11_sign.c =================================================================== RCS file: /cvsroot/muscleapps/PKCS11/src/p11_sign.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- p11_sign.c 4 Oct 2003 08:30:18 -0000 1.13 +++ p11_sign.c 27 Feb 2004 17:24:59 -0000 1.14 @@ -83,7 +83,7 @@ MSCCryptInit cryptInit; P11_Session *session; // = (P11_Session *)hSession; P11_Object *key; // = (P11_Object *)session->sign_key; - CK_BYTE *to = 0; + CK_BYTE *to = NULL; CK_ULONG tlen; P11_Slot *slot; CK_ULONG slotID; @@ -107,8 +107,14 @@ if (CKR_ERROR(rv = slot_TokenChanged())) rv = CKR_SESSION_HANDLE_INVALID; - else if (!pData || !pSignature) + else if (!pData || !pulSignatureLen) rv = CKR_ARGUMENTS_BAD; + else if (pSignature == NULL) + { + // if pSignature is NULL, return pulSignatureLen with the + // right value to allocate pSignature + *pulSignatureLen = (key->msc_key->keySize / 8); + } /* else if (INVALID_SESSION) rv = CKR_SESSION_HANDLE_INVALID; From rousseau@quantz.debian.org Fri Feb 27 17:37:18 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Fri, 27 Feb 2004 18:37:18 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid/readers supported_readers.txt,1.1,1.2 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid/readers In directory quantz:/tmp/cvs-serv19358/readers Modified Files: supported_readers.txt Log Message: add SCR 333 Index: supported_readers.txt =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/readers/supported_readers.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- supported_readers.txt 2 Feb 2004 10:05:34 -0000 1.1 +++ supported_readers.txt 27 Feb 2004 17:37:16 -0000 1.2 @@ -8,6 +8,7 @@ # SCM Microsystems 0x04E6:0x5111:SCR 331-DI +0x04E6:0x5113:SCR 333 0x04E6:0x5115:SCR 335 0x04E6:0xE001:SCR 331 0x04E6:0xE003:SPR 532 From rousseau@quantz.debian.org Fri Feb 27 17:46:44 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Fri, 27 Feb 2004 18:46:44 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid README,1.20,1.21 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid In directory quantz:/tmp/cvs-serv20328 Modified Files: README Log Message: alphabetical reordering of readers Index: README =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/README,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- README 14 Feb 2004 12:46:18 -0000 1.20 +++ README 27 Feb 2004 17:46:41 -0000 1.21 @@ -17,10 +17,10 @@ ======================= (in alphabetical order) +- C3PO LTC31 [8] - Gemplus GemPC 433 SL [2] - Gemplus GemPC Key [3] - Gemplus GemPC Twin [4] -- LTC31 from C3PO [8] - OmniKey CardMan 3121 [5] - SCM Micro SCR 331 [6] - SCM Micro SCR 335 [7] @@ -33,9 +33,9 @@ move them in the supported list above. If you are one of the manufacturers, please, contact me. +- ActivCard USB reader 2.0 [10] - SCM Micro SCR 331-DI [11] - SCM Micro SPR 532 [9] -- ActivCard USB reader 2.0 [10] - Silitek SK-3105 keyboard [12] From rousseau@quantz.debian.org Fri Feb 27 17:51:37 2004 From: rousseau@quantz.debian.org (rousseau@quantz.debian.org) Date: Fri, 27 Feb 2004 18:51:37 +0100 Subject: [Pcsclite-cvs-commit] Drivers/ccid README,1.21,1.22 Message-ID: Update of /cvsroot/pcsclite/Drivers/ccid In directory quantz:/tmp/cvs-serv20535 Modified Files: README Log Message: add C3PO LTC32, SCM Micro SCR 333 and C3PO TLTC2USB in the list of "Should work but untested by me" readers Index: README =================================================================== RCS file: /cvsroot/pcsclite/Drivers/ccid/README,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- README 27 Feb 2004 17:46:41 -0000 1.21 +++ README 27 Feb 2004 17:51:35 -0000 1.22 @@ -34,9 +34,11 @@ manufacturers, please, contact me. - ActivCard USB reader 2.0 [10] +- C3PO LTC32 [13] - SCM Micro SCR 331-DI [11] +- SCM Micro SCR 333 [15] - SCM Micro SPR 532 [9] -- Silitek SK-3105 keyboard [12] +- Silitek SK-3105 keyboard [12] or C3PO TLTC2USB [14] Unsupported CCID readers: @@ -217,11 +219,14 @@ [5] http://www.omnikey.com/en/produkt_details.php3?produkt=1&variante=47 [6] http://www.scmmicro.com/security/SCR331.html [7] http://www.scmmicro.com/security/SCR335.html -[8] http://www.c3po.es/pcsc.htm +[8] http://www.c3po.es/ltc31.html [9] http://www.scmmicro.com/security/SPR532.html [10] http://www.activcard.com/products/usb_reader.html [11] http://www.scmmicro.com/security/SCR331-DI.html [12] http://www.silitek.com/prod/getProduct.do?xml_id=4_2&menu_id=4_2_8&cid=1_8_5 +[13] http://www.c3po.es/ltc32.html +[14] http://www.c3po.es/tltc2usb.html +[15] http://www.scmmicro.com/security/SCR333.html $Id$