File ccid-svn2650.patch of Package pcsc-ccid

Index: readers/Eutron_CryptoIdentity.txt
===================================================================
--- readers/Eutron_CryptoIdentity.txt	(revision 0)
+++ readers/Eutron_CryptoIdentity.txt	(revision 2651)
@@ -0,0 +1,306 @@
+ idVendor: 0x073D
+  iManufacturer: Eutron
+ idProduct: 0x0008
+  iProduct: CryptoIdentity CCID
+ bcdDevice: 1.00 (firmware release?)
+ bLength: 9
+ bDescriptorType: 4
+ bInterfaceNumber: 0
+ bAlternateSetting: 0
+ bNumEndpoints: 3
+ bulk-IN, bulk-OUT and Interrupt-IN
+ bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
+ bInterfaceSubClass: 0
+ bInterfaceProtocol: 0
+ bulk transfer, optional interrupt-IN
+ iInterface: 0
+ CCID Class Descriptor
+  bLength: 0x36
+  bDescriptorType: 0x21
+  bcdCCID: 1.00
+  bMaxSlotIndex: 0x00
+  bVoltageSupport: 0x07
+   5.0V
+   3.0V
+   1.8V
+  dwProtocols: 0x0000 0x0003
+   T=0
+   T=1
+  dwDefaultClock: 4.000 MHz
+  dwMaximumClock: 4.000 MHz
+  bNumClockSupported: 0 (will use whatever is returned)
+   IFD does not support GET CLOCK FREQUENCIES request: Input/output error
+  dwDataRate: 10752 bps
+  dwMaxDataRate: 344086 bps
+  bNumDataRatesSupported: 0 (will use whatever is returned)
+   Support 9984 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -994159232 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support 8750 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -994159232 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support 7500 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -994159232 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support 6250 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -994159232 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support 5000 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -994159232 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support 3750 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -994159232 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support 2500 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -994159232 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support 1250 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -994159232 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support -1 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 1 bps
+   Support -992823296 bps
+   Support -994475012 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+   Support 0 bps
+  dwMaxIFSD: 254
+  dwSynchProtocols: 0x00000000
+  dwMechanical: 0x00000000
+   No special characteristics
+  dwFeatures: 0x00010230
+   ....10 Automatic ICC clock frequency change according to parameters
+   ....20 Automatic baud rate change according to frequency and Fi, Di params
+   ..02.. NAD value other than 00 accepted (T=1)
+   01.... TPDU level exchange
+  dwMaxCCIDMessageLength: 271 bytes
+  bClassGetResponse: 0x00
+  bClassEnveloppe: 0x00
+  wLcdLayout: 0x0000
+  bPINSupport: 0x00
+  bMaxCCIDBusySlots: 1
Index: readers/JCOP41V221.txt
===================================================================
--- readers/JCOP41V221.txt	(revision 0)
+++ readers/JCOP41V221.txt	(revision 2651)
@@ -0,0 +1,49 @@
+ idVendor: 0x0471
+  iManufacturer: Philips Semiconductors
+ idProduct: 0x040F
+  iProduct: JCOP41V221
+ bcdDevice: 1.00 (firmware release?)
+ bLength: 9
+ bDescriptorType: 4
+ bInterfaceNumber: 0
+ bAlternateSetting: 0
+ bNumEndpoints: 0
+  Control only
+ bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
+ bInterfaceSubClass: 0
+ bInterfaceProtocol: 2
+  ICCD Version B, Control transfers, (optional interrupt-IN)
+ iInterface: 0
+ CCID Class Descriptor
+  bLength: 0x36
+  bDescriptorType: 0x21
+  bcdCCID: 2.00
+  bMaxSlotIndex: 0x00
+  bVoltageSupport: 0x01
+   5.0V
+  dwProtocols: 0x0000 0x0002
+   T=1
+  dwDefaultClock: 3.580 MHz
+  dwMaximumClock: 3.580 MHz
+  bNumClockSupported: 0 (will use whatever is returned)
+   IFD does not support GET CLOCK FREQUENCIES request: Broken pipe
+  dwDataRate: 9600 bps
+  dwMaxDataRate: 9600 bps
+  bNumDataRatesSupported: 0 (will use whatever is returned)
+   IFD does not support GET_DATA_RATES request: Broken pipe
+  dwMaxIFSD: 254
+  dwSynchProtocols: 0x00000000
+  dwMechanical: 0x00000000
+   No special characteristics
+  dwFeatures: 0x00020840
+   ....40 Automatic parameters negotiation made by the CCID
+   ..08.. Unknown (ICCD?)
+   02.... Short APDU level exchange
+  dwMaxCCIDMessageLength: 261 bytes
+  bClassGetResponse: 0xFF
+   echoes the APDU class
+  bClassEnveloppe: 0xFF
+   echoes the APDU class
+  wLcdLayout: 0x0000
+  bPINSupport: 0x00
+  bMaxCCIDBusySlots: 1
Index: readers/Oz776_7772.txt
===================================================================
--- readers/Oz776_7772.txt	(revision 0)
+++ readers/Oz776_7772.txt	(revision 2651)
@@ -0,0 +1,50 @@
+ idVendor: 0x0B97
+  iManufacturer: O2
+ idProduct: 0x7772
+  iProduct: O2Micro CCID SC Reader
+ bcdDevice: 1.10 (firmware release?)
+ bLength: 9
+ bDescriptorType: 4
+ bInterfaceNumber: 0
+ bAlternateSetting: 0
+ bNumEndpoints: 3
+  bulk-IN, bulk-OUT and Interrupt-IN
+ bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
+ bInterfaceSubClass: 0
+ bInterfaceProtocol: 0
+  bulk transfer, optional interrupt-IN
+ iInterface: 0
+ CCID Class Descriptor
+  bLength: 0x36
+  bDescriptorType: 0x21
+  bcdCCID: 1.00
+  bMaxSlotIndex: 0x00
+  bVoltageSupport: 0x07
+   5.0V
+   3.0V
+   1.8V
+  dwProtocols: 0x0000 0x0003
+   T=0
+   T=1
+  dwDefaultClock: 4.000 MHz
+  dwMaximumClock: 4.000 MHz
+  bNumClockSupported: 0 (will use whatever is returned)
+   Support 4000 kHz
+  dwDataRate: 9600 bps
+  dwMaxDataRate: 307200 bps
+  bNumDataRatesSupported: 0 (will use whatever is returned)
+   Support 9600 bps
+  dwMaxIFSD: 254
+  dwSynchProtocols: 0x00000000
+  dwMechanical: 0x00000000
+   No special characteristics
+  dwFeatures: 0x00000030
+   ....10 Automatic ICC clock frequency change according to parameters
+   ....20 Automatic baud rate change according to frequency and Fi, Di params
+   00.... Character level exchange
+  dwMaxCCIDMessageLength: 271 bytes
+  bClassGetResponse: 0x00
+  bClassEnveloppe: 0x00
+  wLcdLayout: 0x0000
+  bPINSupport: 0x00
+  bMaxCCIDBusySlots: 1
Index: readers/CardMan5321.txt
===================================================================
--- readers/CardMan5321.txt	(revision 0)
+++ readers/CardMan5321.txt	(revision 2651)
@@ -0,0 +1,170 @@
+ idVendor: 0x076B
+  iManufacturer: OMNIKEY
+ idProduct: 0x5321
+  iProduct: Smart Card Reader USB
+ bcdDevice: 5.00 (firmware release?)
+ bLength: 9
+ bDescriptorType: 4
+ bInterfaceNumber: 0
+ bAlternateSetting: 0
+ bNumEndpoints: 3
+  bulk-IN, bulk-OUT and Interrupt-IN
+ bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
+ bInterfaceSubClass: 0
+ bInterfaceProtocol: 0
+  bulk transfer, optional interrupt-IN
+ iInterface: 0
+ CCID Class Descriptor
+  bLength: 0x36
+  bDescriptorType: 0x21
+  bcdCCID: 1.00
+  bMaxSlotIndex: 0x00
+  bVoltageSupport: 0x07
+   5.0V
+   3.0V
+   1.8V
+  dwProtocols: 0x0000 0x0003
+   T=0
+   T=1
+  dwDefaultClock: 4.800 MHz
+  dwMaximumClock: 8.000 MHz
+  bNumClockSupported: 4 
+   Got 256 clock frequencies but was expecting 4
+   Support 4000 kHz
+   Support 4800 kHz
+   Support 6000 kHz
+   Support 8000 kHz
+  dwDataRate: 10752 bps
+  dwMaxDataRate: 412903 bps
+  bNumDataRatesSupported: 106 
+   Got 256 data rates but was expecting 106
+   Support 10752 bps
+   Support 21505 bps
+   Support 43010 bps
+   Support 86021 bps
+   Support 172043 bps
+   Support 344086 bps
+   Support 129032 bps
+   Support 215053 bps
+   Support 12903 bps
+   Support 25806 bps
+   Support 51612 bps
+   Support 103225 bps
+   Support 206451 bps
+   Support 412903 bps
+   Support 154838 bps
+   Support 258064 bps
+   Support 7168 bps
+   Support 14336 bps
+   Support 28673 bps
+   Support 57347 bps
+   Support 114695 bps
+   Support 229390 bps
+   Support 143369 bps
+   Support 8602 bps
+   Support 17204 bps
+   Support 34408 bps
+   Support 68817 bps
+   Support 137634 bps
+   Support 275268 bps
+   Support 5376 bps
+   Support 64516 bps
+   Support 107526 bps
+   Support 6451 bps
+   Support 77419 bps
+   Support 8064 bps
+   Support 16129 bps
+   Support 32258 bps
+   Support 96774 bps
+   Support 161290 bps
+   Support 3584 bps
+   Support 71684 bps
+   Support 4301 bps
+   Support 2688 bps
+   Support 53763 bps
+   Support 3225 bps
+   Support 38709 bps
+   Support 4032 bps
+   Support 48387 bps
+   Support 80645 bps
+   Support 2150 bps
+   Support 2580 bps
+   Support 5161 bps
+   Support 10322 bps
+   Support 20645 bps
+   Support 41290 bps
+   Support 82580 bps
+   Support 30967 bps
+   Support 7812 bps
+   Support 15625 bps
+   Support 31250 bps
+   Support 62500 bps
+   Support 125000 bps
+   Support 250000 bps
+   Support 93750 bps
+   Support 156250 bps
+   Support 9375 bps
+   Support 18750 bps
+   Support 37500 bps
+   Support 75000 bps
+   Support 150000 bps
+   Support 300000 bps
+   Support 112500 bps
+   Support 187500 bps
+   Support 5208 bps
+   Support 10416 bps
+   Support 20833 bps
+   Support 41666 bps
+   Support 83333 bps
+   Support 166666 bps
+   Support 104166 bps
+   Support 6250 bps
+   Support 12500 bps
+   Support 25000 bps
+   Support 50000 bps
+   Support 100000 bps
+   Support 200000 bps
+   Support 3906 bps
+   Support 46875 bps
+   Support 78125 bps
+   Support 4687 bps
+   Support 56250 bps
+   Support 5859 bps
+   Support 11718 bps
+   Support 23437 bps
+   Support 70312 bps
+   Support 117187 bps
+   Support 2604 bps
+   Support 52083 bps
+   Support 3125 bps
+   Support 1953 bps
+   Support 39062 bps
+   Support 2343 bps
+   Support 28125 bps
+   Support 2929 bps
+   Support 35156 bps
+   Support 58593 bps
+  dwMaxIFSD: 254
+  dwSynchProtocols: 0x00000007
+   2-wire protocol
+   3-wire protocol
+   I2C protocol
+  dwMechanical: 0x00000000
+   No special characteristics
+  dwFeatures: 0x000207B2
+   ....02 Automatic parameter configuration based on ATR data
+   ....10 Automatic ICC clock frequency change according to parameters
+   ....20 Automatic baud rate change according to frequency and Fi, Di params
+   ....80 Automatic PPS made by the CCID
+   ..01.. CCID can set ICC in clock stop mode
+   ..02.. NAD value other than 00 accepted (T=1)
+   ..04.. Automatic IFSD exchange as first exchange (T=1)
+   02.... Short APDU level exchange
+  dwMaxCCIDMessageLength: 271 bytes
+  bClassGetResponse: 0xFF
+   echoes the APDU class
+  bClassEnveloppe: 0xFF
+   echoes the APDU class
+  wLcdLayout: 0x0000
+  bPINSupport: 0x00
+  bMaxCCIDBusySlots: 1
Index: readers/GnD_StarSignCardToken350.txt
===================================================================
--- readers/GnD_StarSignCardToken350.txt	(revision 0)
+++ readers/GnD_StarSignCardToken350.txt	(revision 2651)
@@ -0,0 +1,49 @@
+ idVendor: 0x1059
+  iManufacturer: Giesecke & Devrient GmbH
+ idProduct: 0x000C
+  iProduct: ICCD Smartcard
+ bcdDevice: 1.00 (firmware release?)
+ bLength: 9
+ bDescriptorType: 4
+ bInterfaceNumber: 0
+ bAlternateSetting: 0
+ bNumEndpoints: 1
+  Interrupt-IN
+ bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
+ bInterfaceSubClass: 0
+ bInterfaceProtocol: 2
+  ICCD Version B, Control transfers, (optional interrupt-IN)
+ iInterface: 0
+ CCID Class Descriptor
+  bLength: 0x36
+  bDescriptorType: 0x21
+  bcdCCID: 1.10
+  bMaxSlotIndex: 0x00
+  bVoltageSupport: 0x01
+   5.0V
+  dwProtocols: 0x0000 0x0002
+   T=1
+  dwDefaultClock: 3.580 MHz
+  dwMaximumClock: 3.580 MHz
+  bNumClockSupported: 0 (will use whatever is returned)
+   IFD does not support GET CLOCK FREQUENCIES request: Broken pipe
+  dwDataRate: 9600 bps
+  dwMaxDataRate: 9600 bps
+  bNumDataRatesSupported: 0 (will use whatever is returned)
+   IFD does not support GET_DATA_RATES request: Broken pipe
+  dwMaxIFSD: 254
+  dwSynchProtocols: 0x00000000
+  dwMechanical: 0x00000000
+   No special characteristics
+  dwFeatures: 0x00020840
+   ....40 Automatic parameters negotiation made by the CCID
+   ..08.. Unknown (ICCD?)
+   02.... Short APDU level exchange
+  dwMaxCCIDMessageLength: 280 bytes
+  bClassGetResponse: 0xFF
+   echoes the APDU class
+  bClassEnveloppe: 0xFF
+   echoes the APDU class
+  wLcdLayout: 0x0000
+  bPINSupport: 0x00
+  bMaxCCIDBusySlots: 1
Index: readers/GnD_StarSignCardToken550.txt
===================================================================
--- readers/GnD_StarSignCardToken550.txt	(revision 0)
+++ readers/GnD_StarSignCardToken550.txt	(revision 2651)
@@ -0,0 +1,49 @@
+ idVendor: 0x1059
+  iManufacturer: Giesecke & Devrient GmbH
+ idProduct: 0x000D
+  iProduct: ICCD Smartcard
+ bcdDevice: 1.00 (firmware release?)
+ bLength: 9
+ bDescriptorType: 4
+ bInterfaceNumber: 0
+ bAlternateSetting: 0
+ bNumEndpoints: 1
+  Interrupt-IN
+ bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
+ bInterfaceSubClass: 0
+ bInterfaceProtocol: 2
+  ICCD Version B, Control transfers, (optional interrupt-IN)
+ iInterface: 0
+ CCID Class Descriptor
+  bLength: 0x36
+  bDescriptorType: 0x21
+  bcdCCID: 1.10
+  bMaxSlotIndex: 0x00
+  bVoltageSupport: 0x01
+   5.0V
+  dwProtocols: 0x0000 0x0002
+   T=1
+  dwDefaultClock: 3.580 MHz
+  dwMaximumClock: 3.580 MHz
+  bNumClockSupported: 0 (will use whatever is returned)
+   IFD does not support GET CLOCK FREQUENCIES request: Broken pipe
+  dwDataRate: 9600 bps
+  dwMaxDataRate: 9600 bps
+  bNumDataRatesSupported: 0 (will use whatever is returned)
+   IFD does not support GET_DATA_RATES request: Broken pipe
+  dwMaxIFSD: 254
+  dwSynchProtocols: 0x00000000
+  dwMechanical: 0x00000000
+   No special characteristics
+  dwFeatures: 0x00020840
+   ....40 Automatic parameters negotiation made by the CCID
+   ..08.. Unknown (ICCD?)
+   02.... Short APDU level exchange
+  dwMaxCCIDMessageLength: 261 bytes
+  bClassGetResponse: 0xFF
+   echoes the APDU class
+  bClassEnveloppe: 0xFF
+   echoes the APDU class
+  wLcdLayout: 0x0000
+  bPINSupport: 0x00
+  bMaxCCIDBusySlots: 1
Index: readers/SafeNet_IKey4000.txt
===================================================================
--- readers/SafeNet_IKey4000.txt	(revision 0)
+++ readers/SafeNet_IKey4000.txt	(revision 2651)
@@ -0,0 +1,49 @@
+ idVendor: 0x04B9
+  iManufacturer: Philips Semiconductors
+ idProduct: 0x1400
+  iProduct: SmartMX Sample
+ bcdDevice: 1.00 (firmware release?)
+ bLength: 9
+ bDescriptorType: 4
+ bInterfaceNumber: 0
+ bAlternateSetting: 0
+ bNumEndpoints: 1
+  Interrupt-IN
+ bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
+ bInterfaceSubClass: 0
+ bInterfaceProtocol: 2
+  ICCD Version B, Control transfers, (optional interrupt-IN)
+ iInterface: 0
+ CCID Class Descriptor
+  bLength: 0x36
+  bDescriptorType: 0x21
+  bcdCCID: 1.10
+  bMaxSlotIndex: 0x00
+  bVoltageSupport: 0x01
+   5.0V
+  dwProtocols: 0x0000 0x0002
+   T=1
+  dwDefaultClock: 3.580 MHz
+  dwMaximumClock: 3.580 MHz
+  bNumClockSupported: 0 (will use whatever is returned)
+   IFD does not support GET CLOCK FREQUENCIES request: Broken pipe
+  dwDataRate: 9600 bps
+  dwMaxDataRate: 9600 bps
+  bNumDataRatesSupported: 0 (will use whatever is returned)
+   IFD does not support GET_DATA_RATES request: Broken pipe
+  dwMaxIFSD: 254
+  dwSynchProtocols: 0x00000000
+  dwMechanical: 0x00000000
+   No special characteristics
+  dwFeatures: 0x00020840
+   ....40 Automatic parameters negotiation made by the CCID
+   ..08.. Unknown (ICCD?)
+   02.... Short APDU level exchange
+  dwMaxCCIDMessageLength: 261 bytes
+  bClassGetResponse: 0xFF
+   echoes the APDU class
+  bClassEnveloppe: 0xFF
+   echoes the APDU class
+  wLcdLayout: 0x0000
+  bPINSupport: 0x00
+  bMaxCCIDBusySlots: 1
Index: readers/Sitecom_MD-010.txt
===================================================================
--- readers/Sitecom_MD-010.txt	(revision 2522)
+++ readers/Sitecom_MD-010.txt	(working copy)
@@ -107,24 +107,3 @@
   wLcdLayout: 0x0000
   bPINSupport: 0x00
   bMaxCCIDBusySlots: 1
- idVendor: 0x2770
-  iManufacturer: ?
- idProduct: 0x9120
-  iProduct: USB DIGITAL STILL CAMERA
- bcdDevice: 1.00 (firmware release?)
- bLength: 9
- bDescriptorType: 4
- bInterfaceNumber: 0
- bAlternateSetting: 0
- bNumEndpoints: 3
- bInterfaceClass: 0xFF
-  NOT A CCID DEVICE
-  Class is 0xFF (proprietary)
- bInterfaceSubClass: 255
-  UNSUPPORTED SubClass
- bInterfaceProtocol: 255
-  UNSUPPORTED InterfaceProtocol
- iInterface: 0
-USB extra length is too short: 0
-
-  NOT A CCID DEVICE
Index: readers/GemPCTwin.txt
===================================================================
--- readers/GemPCTwin.txt	(revision 2522)
+++ readers/GemPCTwin.txt	(working copy)
@@ -8,9 +8,11 @@
  bInterfaceNumber: 0
  bAlternateSetting: 0
  bNumEndpoints: 3
+  bulk-IN, bulk-OUT and Interrupt-IN
  bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
  bInterfaceSubClass: 0
  bInterfaceProtocol: 0
+  bulk transfer, optional interrupt-IN
  iInterface: 0
  CCID Class Descriptor
   bLength: 0x36
Index: readers/GemPCPinpad.txt
===================================================================
--- readers/GemPCPinpad.txt	(revision 2522)
+++ readers/GemPCPinpad.txt	(working copy)
@@ -1,4 +1,3 @@
-Parsing Interface Descriptor for device: 002/092
  idVendor: 0x08E6
   iManufacturer: Gemplus
  idProduct: 0x3478
@@ -9,9 +8,11 @@
  bInterfaceNumber: 0
  bAlternateSetting: 0
  bNumEndpoints: 3
+  bulk-IN, bulk-OUT and Interrupt-IN
  bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
  bInterfaceSubClass: 0
  bInterfaceProtocol: 0
+  bulk transfer, optional interrupt-IN
  iInterface: 0
  CCID Class Descriptor
   bLength: 0x36
Index: readers/supported_readers.txt
===================================================================
--- readers/supported_readers.txt	(revision 2522)
+++ readers/supported_readers.txt	(working copy)
@@ -37,6 +37,7 @@
 0x076B:0x4321:OmniKey CardMan 4321
 0x076B:0x5121:OmniKey CardMan 5121
 0x076B:0x5125:OmniKey CardMan 5125
+0x076B:0x5321:OmniKey CardMan 5321
 0x076B:0x6622:OmniKey CardMan 6121
 0x076B:0xA022:Teo by Xiring
 
@@ -72,6 +73,7 @@
 
 # O2 Micro
 0x0b97:0x7762:O2 Micro Oz776
+0x0b97:0x7772:O2 Micro Oz776
 
 # Kobil
 0x0D46:0x3001:KOBIL KAAN Base
@@ -83,6 +85,7 @@
 # Eutron
 0x073D:0x0C00:Eutron SIM Pocket Combo
 0x073D:0x0007:Eutron CryptoIdentity
+0x073D:0x0008:Eutron CryptoIdentity
 
 # Athena
 0x0DC3:0x1004:Athena ASE IIIe
@@ -117,3 +120,12 @@
 # Schlumberger/Axlalto/Gemalto
 0x0973:0x0003:SchlumbergerSema Cyberflex Access
 
+# Philips
+0x0471:0x040F:Philips JCOP41V221
+
+# Rainbow/SafeNet
+0x04B9:0x1400:SafeNet IKey4000
+
+# Giesecke & Devrient
+0x1059:0x000C:G&D CardToken 350
+0x1059:0x000D:G&D CardToken 550
Index: readers/Makefile.am
===================================================================
--- readers/Makefile.am	(revision 2522)
+++ readers/Makefile.am	(working copy)
@@ -18,6 +18,7 @@
 	CardMan3821.txt \
 	CardMan4321.txt \
 	CardMan5125.txt \
+	CardMan5321.txt \
 	CardMan6121.txt \
 	CherrySmartTerminalST2XXX.txt \
 	CherryST1044U.txt \
@@ -28,6 +29,7 @@
 	DellSCRK.txt \
 	DellSK-3106.txt \
 	e-gate.txt \
+	Eutron_CryptoIdentity.txt \
 	FujitsuSiemens_SmartCard_Keyboard_USB_2A.txt \
 	FujitsuSiemens_SmartCard_USB_2A.txt \
 	GemCoreSIMPro.txt \
@@ -36,6 +38,8 @@
 	GemPCKey.txt \
 	GemPCPinpad.txt \
 	GemPCTwin.txt \
+	GnD_StarSignCardToken350.txt \
+	GnD_StarSignCardToken550.txt \
 	HPUSBSmartCardKeyboard.txt \
 	iDream.txt \
 	KAAN_Advanced.txt \
@@ -46,6 +50,8 @@
 	mIDentity.txt \
 	MySmartPad.txt \
 	Oz776S.txt \
+	Oz776_7772.txt \
+	SafeNet_IKey4000.txt \
 	SCR3310.txt \
 	SCR3311.txt \
 	SCR331-DI-NTTCom.txt \
Index: configure.in
===================================================================
--- configure.in	(revision 2522)
+++ configure.in	(working copy)
@@ -25,6 +25,7 @@
 
 # Checks for programs.
 AC_PROG_CC
+AM_PROG_CC_C_O
 AC_PROG_CPP
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
@@ -144,6 +145,9 @@
 	AC_TRY_LINK_FUNC(usb_get_string_simple, [ AC_MSG_RESULT([yes]) ],
 		[ AC_MSG_ERROR([your libusb is too old. install version 0.1.7 or above]) ])
 
+	AC_CHECK_FUNC(usb_detach_kernel_driver_np,
+		[ AC_DEFINE(HAVE_USB_DETACH_KERNEL_DRIVER_NP, 1, [Define if usb_detach_kernel_driver_np() is available]) ])
+
 	CPPFLAGS="$saved_CPPFLAGS"
 	LIBS="$saved_LIBS"
 
@@ -234,7 +238,7 @@
 	AC_MSG_CHECKING([for SCardEstablishContext])
 	AC_TRY_LINK_FUNC(SCardEstablishContext,
 	    [ AC_MSG_RESULT([yes]) ],
-		[ AC_MSG_ERROR([SCardEstablishContext() not found, install pcsc-lite 1.2.9-beta9 or later,or use LDLIBS=...  ./configure]) ])
+		[ AC_MSG_ERROR([SCardEstablishContext() not found, install pcsc-lite 1.2.9-beta9 or later,or use PCSC_LIBS=...  ./configure]) ])
 	LIBS="$OLD_LIBS"
 
 	pcsclite=yes
Index: src/Info.plist.src
===================================================================
--- src/Info.plist.src	(revision 0)
+++ src/Info.plist.src	(revision 2651)
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>BNDL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>0.0.1d1</string>
+	<key>ifdCapabilities</key>
+	<string>MAGIC_IFDCAPABILITIES</string>
+
+	<!-- Possible values for ifdCapabilities bits
+	1: IFD_GENERATE_HOTPLUG
+	   plugging the reader calls pcscd \-\-hotplug
+
+	Default value is 0x00000001
+	-->
+
+	<key>ifdProtocolSupport</key>
+	<string>0x00000001</string>
+	<key>ifdVersionNumber</key>
+	<string>0x00000001</string>
+
+	<key>ifdLogLevel</key>
+	<string>0x0003</string>
+
+	<!-- Possible values for ifdLogLevel
+	1: CRITICAL  important error messages
+	2: INFO      informative messages like what reader was detected
+	4: COMM      a dump of all the bytes exchanged between the host and
+	             the reader
+	8: PERIODIC  periodic info when pcscd test if a card is present
+	             (every 1/10 of a second)
+
+	The final value is a OR of these values
+
+	Default value: 3 (CRITICAL + INFO)
+	-->
+
+	<key>ifdDriverOptions</key>
+	<string>0x0000</string>
+
+	<!-- Possible values for ifdDriverOptions
+	1: DRIVER_OPTION_CCID_EXCHANGE_AUTHORIZED
+		the CCID Exchange command is allowed. You can use it through
+		SCardControl(hCard, IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE, ...) 
+
+	2: DRIVER_OPTION_GEMPC_TWIN_KEY_APDU
+		If set the GemPC Twin and GemPC Key readers with be configured
+		so that the T=1 TPDU protocol is done by the firmware instead of
+		the driver.
+		This switches the reader in APDU mode and also in EMV mode so
+		may not work with non EMV cards.
+
+	4: DRIVER_OPTION_USE_BOGUS_FIRMWARE
+		Some reader firmwares have bugs. By default the driver refuses
+		to work with such firmware versions. If your reader is rejected
+		because of the firmware (log message: "Firmware (x.y) is
+		bogus!") you can:
+		- upgrade your reader firmware (not all readers can do that)
+		or
+		- get another reader with a new/bugfree firmware
+		or
+		- activate this option but you will have problems depending on
+		  the bug
+
+	8: DRIVER_OPTION_RESET_ON_CLOSE
+		This option may be required on Linux 2.4 so that the
+		device reset if sequencial (bSeq) counter and can be
+		reused if pcscd restart. Otherwise the reader needs to
+		be unplugged/replugged.
+
+	bits 4 & 5: (values 0, 16, 32, 48)
+	  0: power on the card at 5V (default value)
+	 16: power on the card at 3V and then, it 3V fails use 5V
+	 32: power on the card at 1.8V, then 3V and then 5V
+	 48: let the reader decide
+
+	Default value: 0
+	-->
+
+	<key>CFBundleExecutable</key>
+	<string>TARGET.VERSION</string>
+
+	<key>ifdManufacturerString</key>
+	<string>Ludovic Rousseau (ludovic.rousseau@free.fr)</string>
+
+	<key>ifdProductString</key>
+	<string>Generic CCID driver vVERSION</string>
+
+	<key>ifdVendorID</key>
+	<array>
+		MAGIC_VENDOR
+	</array>
+
+	<key>ifdProductID</key>
+	<array>
+		MAGIC_PRODUCT
+	</array>
+
+	<key>ifdFriendlyName</key>
+	<array>
+		MAGIC_FRIENDLYNAME
+	</array>
+
+	<key>Copyright</key>
+	<string>This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.</string>
+
+</dict>
+</plist>
Index: src/commands.c
===================================================================
--- src/commands.c	(revision 2522)
+++ src/commands.c	(working copy)
@@ -378,10 +378,7 @@
 		return_value = CmdEscape(reader_index, cmd_tmp, sizeof(cmd_tmp),
 			res_tmp, &res_length);
 		if (return_value != IFD_SUCCESS)
-		{
-			ccid_error(res_tmp[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);
 			return return_value;
-		}
 	}
 
 	i2dw(a - 10, cmd + 1);  /* CCID message length */
@@ -934,7 +931,8 @@
 #ifdef O2MICRO_OZ776_PATCH
 		/* the O2MICRO OZ 776 reader sends card absent or mute errors
 		 * when no card is inserted */
-		if (! ((OZ776 == ccid_descriptor->readerID)
+		if (! (((OZ776 == ccid_descriptor->readerID)
+			|| (OZ776_7772 == ccid_descriptor->readerID))
 			&& (buffer[ERROR_OFFSET] == 0xFE)))
 #endif
 		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
Index: src/ccid.c
===================================================================
--- src/ccid.c	(revision 2522)
+++ src/ccid.c	(working copy)
@@ -323,7 +323,7 @@
 void ccid_error(int error, const char *file, int line, const char *function)
 {
 	const char *text;
-	char var_text[20];
+	char var_text[30];
 
 	switch (error)
 	{
Index: src/Info.plist
===================================================================
--- src/Info.plist	(revision 2522)
+++ src/Info.plist	(working copy)
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>BNDL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>0.0.1d1</string>
-	<key>ifdCapabilities</key>
-	<string>MAGIC_IFDCAPABILITIES</string>
-
-	<!-- Possible values for ifdCapabilities bits
-	1: IFD_GENERATE_HOTPLUG
-	   plugging the reader calls pcscd \-\-hotplug
-
-	Default value is 0x00000001
-	-->
-
-	<key>ifdProtocolSupport</key>
-	<string>0x00000001</string>
-	<key>ifdVersionNumber</key>
-	<string>0x00000001</string>
-
-	<key>ifdLogLevel</key>
-	<string>0x0003</string>
-
-	<!-- Possible values for ifdLogLevel
-	1: CRITICAL  important error messages
-	2: INFO      informative messages like what reader was detected
-	4: COMM      a dump of all the bytes exchanged between the host and
-	             the reader
-	8: PERIODIC  periodic info when pcscd test if a card is present
-	             (every 1/10 of a second)
-
-	The final value is a OR of these values
-
-	Default value: 3 (CRITICAL + INFO)
-	-->
-
-	<key>ifdDriverOptions</key>
-	<string>0x0000</string>
-
-	<!-- Possible values for ifdDriverOptions
-	1: DRIVER_OPTION_CCID_EXCHANGE_AUTHORIZED
-		the CCID Exchange command is allowed. You can use it through
-		SCardControl(hCard, IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE, ...) 
-
-	2: DRIVER_OPTION_GEMPC_TWIN_KEY_APDU
-		If set the GemPC Twin and GemPC Key readers with be configured
-		so that the T=1 TPDU protocol is done by the firmware instead of
-		the driver.
-		This switches the reader in APDU mode and also in EMV mode so
-		may not work with non EMV cards.
-
-	4: DRIVER_OPTION_USE_BOGUS_FIRMWARE
-		Some reader firmwares have bugs. By default the driver refuses
-		to work with such firmware versions. If your reader is rejected
-		because of the firmware (log message: "Firmware (x.y) is
-		bogus!") you can:
-		- upgrade your reader firmware (not all readers can do that)
-		or
-		- get another reader with a new/bugfree firmware
-		or
-		- activate this option but you will have problems depending on
-		  the bug
-
-	8: DRIVER_OPTION_RESET_ON_CLOSE
-		This option may be required on Linux 2.4 so that the
-		device reset if sequencial (bSeq) counter and can be
-		reused if pcscd restart. Otherwise the reader needs to
-		be unplugged/replugged.
-
-	bits 4 & 5: (values 0, 16, 32, 48)
-	  0: power on the card at 5V (default value)
-	 16: power on the card at 3V and then, it 3V fails use 5V
-	 32: power on the card at 1.8V, then 3V and then 5V
-	 48: let the reader decide
-
-	Default value: 0
-	-->
-
-	<key>CFBundleExecutable</key>
-	<string>TARGET.VERSION</string>
-
-	<key>ifdManufacturerString</key>
-	<string>Ludovic Rousseau (ludovic.rousseau@free.fr)</string>
-
-	<key>ifdProductString</key>
-	<string>Generic CCID driver vVERSION</string>
-
-	<key>ifdVendorID</key>
-	<array>
-		MAGIC_VENDOR
-	</array>
-
-	<key>ifdProductID</key>
-	<array>
-		MAGIC_PRODUCT
-	</array>
-
-	<key>ifdFriendlyName</key>
-	<array>
-		MAGIC_FRIENDLYNAME
-	</array>
-
-	<key>Copyright</key>
-	<string>This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.</string>
-
-</dict>
-</plist>
Index: src/ccid.h
===================================================================
--- src/ccid.h	(revision 2522)
+++ src/ccid.h	(working copy)
@@ -142,6 +142,7 @@
 #define CHERRYXX33	0x046A0005
 #define CHERRYST2000	0x046A003E
 #define OZ776		0x0B977762
+#define OZ776_7772	0x0B977772
 #define SPR532		0x04E6E003
 #define MYSMARTPAD	0x09BE0002
 #define CHERRYXX44	0x046a0010
Index: src/parse.c
===================================================================
--- src/parse.c	(revision 2522)
+++ src/parse.c	(working copy)
@@ -51,6 +51,7 @@
 	static struct usb_bus *busses = NULL;
 	struct usb_bus *bus;
 	struct usb_dev_handle *dev_handle;
+	int nb = 0;
 
 	usb_init();
 	usb_find_busses();
@@ -109,9 +110,12 @@
 
 			ccid_parse_interface_descriptor(dev_handle, dev);
 			usb_close(dev_handle);
+			nb++;
 		}
 	}
 
+	if ((0 == nb) && (0 != geteuid()))
+		fprintf(stderr, "Can't find any CCID device.\nMaybe you must run parse as root?\n");
 	return 0;
 } /* main */
 
Index: src/ccid_usb.c
===================================================================
--- src/ccid_usb.c	(revision 2522)
+++ src/ccid_usb.c	(working copy)
@@ -633,6 +633,9 @@
 {
 	struct usb_interface *usb_interface = NULL;
 	int i;
+#ifdef O2MICRO_OZ776_PATCH
+	int readerID;
+#endif
 
 	/* if multiple interfaces use the first one with CCID class type */
 	for (i=0; i<dev->config->bNumInterfaces; i++)
@@ -650,9 +653,9 @@
 	}
 
 #ifdef O2MICRO_OZ776_PATCH
+	readerID = (dev->descriptor.idVendor << 16) + dev->descriptor.idProduct;
 	if (usb_interface != NULL
-		&& (OZ776 == (dev->descriptor.idVendor << 16)
-		+ dev->descriptor.idProduct)
+		&& ((OZ776 == readerID) || (OZ776_7772 == readerID))
 		&& (0 == usb_interface->altsetting->extralen)) /* this is the bug */
 	{
 		for (i=0; i<usb_interface->altsetting->bNumEndpoints; i++)
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 2522)
+++ src/Makefile.am	(working copy)
@@ -62,7 +62,7 @@
 parse_LDADD = libccid.la
 parse_CFLAGS = $(PCSC_CFLAGS) $(LIBUSB_CFLAGS)
 
-EXTRA_DIST = Info.plist create_Info_plist.pl reader.conf.in \
+EXTRA_DIST = Info.plist.src create_Info_plist.pl reader.conf.in \
 	towitoko/COPYING towitoko/README openct/LICENSE \
 	convert_version.pl pcscd_ccid.rules
 
@@ -75,9 +75,14 @@
 ifdCapabilities=0x00000000
 endif
 
-install_ccid: libccid.la
+Info.plist: Info.plist.src $(srcdir)/../readers/supported_readers.txt
+	$(srcdir)/create_Info_plist.pl $(srcdir)/../readers/supported_readers.txt $(srcdir)/Info.plist.src $(ifdCapabilities) | sed s/VERSION/$(VERSION)/ | sed s/TARGET/$(CCID_LIB)/ > Info.plist
+	
+DISTCLEANFILES = Info.plist
+
+install_ccid: libccid.la Info.plist
 	$(mkinstalldirs) $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/$(BUNDLE_HOST)/
-	$(srcdir)/create_Info_plist.pl $(srcdir)/../readers/supported_readers.txt $(srcdir)/Info.plist $(ifdCapabilities) | sed s/VERSION/$(VERSION)/ | sed s/TARGET/$(CCID_LIB)/ > $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/Info.plist
+	cp Info.plist $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/
 	cp .libs/$(CCID_LIB) $(DESTDIR)$(usbdropdir)/$(CCID_BUNDLE)/Contents/$(BUNDLE_HOST)/$(CCID_LIB).$(VERSION)
 	$(INSTALL_UDEV_RULE_FILE)
 
Index: README
===================================================================
--- README	(revision 2522)
+++ README	(working copy)
@@ -86,6 +86,8 @@
 - Gemplus GemPC Express
 - Fujitsu Siemens Computers SmartCard USB 2A [53]
 - Fujitsu Siemens Computers SmartCard Keyboard USB 2A [54]
+- Giesecke & Devrient StarSign Card Token 350 (ICCD) [57]
+- Giesecke & Devrient StarSign Card Token 550 (ICCD)
 - HP USB Smart Card Keyboard [44]
 - HP USB Smartcard Reader
 - id3 Semiconductors CL1356D [45] (tested by me but I don't have the
@@ -99,8 +101,11 @@
 - OmniKey CardMan 4321 [55]
 - OmniKey CardMan 5121 [33]
 - OmniKey CardMan 5125 [51]
+- OmniKey CardMan 5321 [56]
 - OmniKey CardMan 6121 [36]
-- O2Micro Oz7762
+- O2Micro Oz776 (0x7762 and 0x7772 versions)
+- Philips JCOP41V221
+- SafeNet IKey4000
 - SCM Micro SCR 331-DI NTTCom [23]
 - SCM Micro SCR 3310-NTTCOM [28]
 - SCM Micro SCR 3320 [32]
@@ -217,7 +222,7 @@
       of the Kobil mIDentity. The tool should be started automatically
       by the udev rule on Linux
     - GemPC pinpad: localisation of the string "PIN blocked", add
-      Portugese(pt), Dutch(nl) and Tukish(tr) localisations
+      Portuguese(pt), Dutch(nl) and Turkish(tr) localisations
     - some minor bugs removed
 
 1.2.1 - 27 January 2007, Ludovic Rousseau
@@ -559,6 +564,8 @@
 [53] http://www.fujitsu-siemens.com/solutions/business_solutions/security/security_products/smartcase_scr_usbex.html
 [54] http://www.fujitsu-siemens.com/solutions/business_solutions/security/security_products/smartcase_kbpc_cx.html
 [55] http://omnikey.aaitg.com/?id=products&tx_okprod_pi1[product]=50
+[56] http://omnikey.aaitg.com/?id=products&tx_okprod_pi1[product]=41
+[57] http://www.gi-de.com/portal/page?_pageid=42,126834&_dad=portal&_schema=PORTAL
 
 $Id$
 
Index: contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch.c
===================================================================
--- contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch.c	(revision 2522)
+++ contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch.c	(working copy)
@@ -113,7 +113,7 @@
 		return(rv);
     }
 
-#ifndef __APPLE__
+#ifdef HAVE_USB_DETACH_KERNEL_DRIVER_NP
     printf("failed with error %d, trying to detach kernel driver ....\n", rv);
     rv = usb_detach_kernel_driver_np(usb, ifnum);
     if (rv == 0)
Index: examples/Makefile.am
===================================================================
--- examples/Makefile.am	(revision 2522)
+++ examples/Makefile.am	(working copy)
@@ -2,6 +2,6 @@
 
 noinst_PROGRAMS = scardcontrol
 scardcontrol_SOURCES = scardcontrol.c
-scardcontrol_CFLAGS = $(PCSC_CFLAGS)
-scardcontrol_LDADD = $(PCSC_LIBS)
+scardcontrol_CFLAGS = $(PCSC_CFLAGS) $(PTHREAD_CFLAGS)
+scardcontrol_LDADD = $(PCSC_LIBS) $(PTHREAD_LIBS)
 
Index: examples/scardcontrol.c
===================================================================
--- examples/scardcontrol.c	(revision 2522)
+++ examples/scardcontrol.c	(working copy)
@@ -1,6 +1,6 @@
 /*
     scardcontrol.c: sample code to use/test SCardControl() API
-    Copyright (C) 2004-2005   Ludovic Rousseau
+    Copyright (C) 2004-2007   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
@@ -27,7 +27,12 @@
 #include <unistd.h>
 #include <string.h>
 #include <arpa/inet.h>
+#ifdef __APPLE__
+#include <PCSC/winscard.h>
+#include <PCSC/wintypes.h>
+#else
 #include <winscard.h>
+#endif
 #include <reader.h>
 
 #undef VERIFY_PIN
@@ -61,7 +66,7 @@
 	LONG rv;
 	SCARDCONTEXT hContext;
 	DWORD dwReaders;
-	LPSTR mszReaders;
+	LPSTR mszReaders = NULL;
 	char *ptr, **readers = NULL;
 	int nbReaders;
 	SCARDHANDLE hCard;
@@ -69,7 +74,7 @@
 	BYTE pbAtr[MAX_ATR_SIZE] = "";
 	char pbReader[MAX_READERNAME] = "";
 	int reader_nb;
-	int i;
+	unsigned int i;
 	unsigned char bSendBuffer[MAX_BUFFER_SIZE];
 	unsigned char bRecvBuffer[MAX_BUFFER_SIZE];
 	DWORD send_length, length;
@@ -89,7 +94,7 @@
 #endif
 
 	printf("SCardControl sample code\n");
-	printf("V 1.1 2004-2005, Ludovic Rousseau <ludovic.rousseau@free.fr>\n");
+	printf("V 1.2 2004-2007, Ludovic Rousseau <ludovic.rousseau@free.fr>\n");
 
 	printf("\nTHIS PROGRAM IS NOT DESIGNED AS A TESTING TOOL!\n");
 	printf("Do NOT use it unless you really know what you do.\n\n");
@@ -103,10 +108,7 @@
 
 	/* Retrieve the available readers list */
 	rv = SCardListReaders(hContext, NULL, NULL, &dwReaders);
-	if (rv != SCARD_S_SUCCESS)
-	{
-		printf("SCardListReader: %lX\n", rv);
-	}
+	PCSC_ERROR_EXIT(rv, "SCardListReaders")
 
 	mszReaders = malloc(sizeof(char)*dwReaders);
 	if (mszReaders == NULL)
@@ -258,7 +260,7 @@
 			pioSendPci = *SCARD_PCI_T1;
 			break;
 		default:
-			printf("Unknown protocol\n");
+			printf("Unknown protocol. No card present?\n");
 			return -1;
 	}
 
@@ -556,8 +558,10 @@
 			rv);
 
 	/* free allocated memory */
-	free(mszReaders);
-	free(readers);
+	if (mszReaders)
+		free(mszReaders);
+	if (readers)
+		free(readers);
 
 	return 0;
 } /* main */
openSUSE Build Service is sponsored by