| 1 |
USB CCID IFD Handler
|
| 2 |
====================
|
| 3 |
|
| 4 |
This package provides the source code for a generic USB CCID
|
| 5 |
(Chip/Smart Card Interface Devices) driver. See [1] for the USB CCID
|
| 6 |
specifications from the USB working group.
|
| 7 |
|
| 8 |
|
| 9 |
Author:
|
| 10 |
=======
|
| 11 |
|
| 12 |
- Ludovic Rousseau <ludovic.rousseau@free.fr>
|
| 13 |
|
| 14 |
|
| 15 |
Supported CCID readers:
|
| 16 |
=======================
|
| 17 |
|
| 18 |
(in alphabetical order)
|
| 19 |
- Gemplus GemPC 433 SL [2]
|
| 20 |
- Gemplus GemPC Key [3]
|
| 21 |
- Gemplus GemPC Twin [4]
|
| 22 |
- LTC31 from C3PO [8]
|
| 23 |
- OmniKey CardMan 3121 [5]
|
| 24 |
- SCM Micro SCR 331 [6]
|
| 25 |
- SCM Micro SCR 335 [7]
|
| 26 |
|
| 27 |
|
| 28 |
Should work but untested by me:
|
| 29 |
===============================
|
| 30 |
|
| 31 |
I would like to get these readers to perform test and validation and
|
| 32 |
move them in the supported list above. If you are one of the
|
| 33 |
manufacturers, please, contact me.
|
| 34 |
|
| 35 |
- SCM Micro SPR 532 [9]
|
| 36 |
- ActivCard USB reader 2.0 [10]
|
| 37 |
- Silitek SK-3105 keyboard
|
| 38 |
|
| 39 |
|
| 40 |
Unsupported CCID readers:
|
| 41 |
=========================
|
| 42 |
|
| 43 |
None known.
|
| 44 |
|
| 45 |
|
| 46 |
Supported operating systems:
|
| 47 |
============================
|
| 48 |
|
| 49 |
- GNU/Linux (libusb 0.1.7)
|
| 50 |
- MacOS X/Darwin (libusb 0.1.8beta, CVS snapshot. See "Known problems")
|
| 51 |
to libusb)
|
| 52 |
|
| 53 |
|
| 54 |
Known problems:
|
| 55 |
===============
|
| 56 |
|
| 57 |
All platforms
|
| 58 |
T=1 and TPDU
|
| 59 |
""""""""""""
|
| 60 |
I do not yet included support of T=1 cards when the reader is in
|
| 61 |
TPDU mode.
|
| 62 |
If you have a T=1 card I recommand you to use a reader working in
|
| 63 |
APDU mode. T=1 and TPDU will be supported in a future version of
|
| 64 |
the driver.
|
| 65 |
|
| 66 |
readers enumeration
|
| 67 |
"""""""""""""""""""
|
| 68 |
You may have wrong reader identification if you connect two or
|
| 69 |
more reader at the exact same time.
|
| 70 |
|
| 71 |
The daemon pcscd and the CCID driver do not list connected readers
|
| 72 |
in the same order. The driver has no way to know which reader has
|
| 73 |
been detected as a new reader by pcscd.
|
| 74 |
|
| 75 |
So if you plug two readers at the same time (for example if you
|
| 76 |
start pcscd with two readers connected or if you plug a USB hub
|
| 77 |
with two readers on the hub) you may have this (with two readers
|
| 78 |
foo and bar):
|
| 79 |
- pcscd scans the USB bus and finds a new CCID reader foo and
|
| 80 |
calls the driver
|
| 81 |
- the CCID driver scan the USB bus and finds a new different
|
| 82 |
reader bar
|
| 83 |
- pcscd continues scanning the USB bus and finds the second reader
|
| 84 |
bar and calls the driver
|
| 85 |
- the CCID driver scan the USB bus and finds an unused reader foo.
|
| 86 |
|
| 87 |
Now the reader foo will be called bar by pcscd and bar will be
|
| 88 |
called foo. This may not be a problem if the two readers have
|
| 89 |
the same name. But it is strange to insert a card in the
|
| 90 |
physical reader foo and see pcscd detect the card insertion in
|
| 91 |
the reader he calls bar.
|
| 92 |
|
| 93 |
The solution is to use IFDHCreateChannelByName() instead of
|
| 94 |
IFDHCreateChannel() and specify the USB device to use. But pcscd
|
| 95 |
does not implement IFDHCreateChannelByName() yet. Maybe in the
|
| 96 |
future.
|
| 97 |
|
| 98 |
Another solution is to plug readers one after the other and not
|
| 99 |
at the same time.
|
| 100 |
|
| 101 |
*BSD
|
| 102 |
libusb
|
| 103 |
""""""
|
| 104 |
The libusb does not yet support USB interrupt endpoints. You will
|
| 105 |
notice that the driver will stop working as soon as you insert a
|
| 106 |
card in the reader.
|
| 107 |
A new version of libusb should fix this bug.
|
| 108 |
|
| 109 |
|
| 110 |
Licence:
|
| 111 |
========
|
| 112 |
|
| 113 |
This program is free software; you can redistribute it and/or modify
|
| 114 |
it under the terms of the GNU General Public License as published by the
|
| 115 |
Free Software Foundation; either version 2 of the License, or (at your
|
| 116 |
option) any later version.
|
| 117 |
|
| 118 |
This program is distributed in the hope that it will be useful, but
|
| 119 |
WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 120 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 121 |
General Public License for more details.
|
| 122 |
|
| 123 |
You should have received a copy of the GNU General Public License
|
| 124 |
along with this program; if not, write to the Free Software Foundation,
|
| 125 |
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 126 |
|
| 127 |
|
| 128 |
History:
|
| 129 |
========
|
| 130 |
|
| 131 |
0.3.2 - 4 November 2003, Ludovic Rousseau
|
| 132 |
- src/commands.c: correct a stupid bug that occurs with an APDU with
|
| 133 |
2 bytes response.
|
| 134 |
- Info.plist: add SPR 532 in list of supported readers
|
| 135 |
- parse.c: do not exit if the InterfaceClass is 0xFF (proprietary).
|
| 136 |
It is the case with old readers manufactured before the final
|
| 137 |
release of the CCID specs.
|
| 138 |
- move LTC31 reader from unsupported to supported reader list. It
|
| 139 |
was my f ault since in used odd INS byte in my test applet and odd
|
| 140 |
INS bytes are forbidden by ISO 7816-4 ch. 5.4.2 Instruction byte.
|
| 141 |
Thanks to Josep Moné s Teixidor for pointing the problem.
|
| 142 |
- src/commands.c: comment out the automatic GET RESPONSE part. I
|
| 143 |
don't think it should be in the driver. Maybe in pcscd instead?
|
| 144 |
|
| 145 |
0.3.1 - 23 September 2003, Ludovic Rouseau
|
| 146 |
- add --enable-multi-thread (enabled by default) for thread safe
|
| 147 |
support an APDU multiplexing. You will need pcsc-lite-1.2.0-rc3 or
|
| 148 |
above to use this feature.
|
| 149 |
- add --enable-libusb=PATH option is your libusb is not installed in
|
| 150 |
/usr or /usr/local
|
| 151 |
- honor DESTDIR in install rules (closes [ #300110 ]). Thanks to
|
| 152 |
Ville Skyttä for the patch.
|
| 153 |
- src/ccid.c: do not switch the GemPC Key and GemPC Twin in APDU
|
| 154 |
mode since it also swicth in EMV mode and may not work with non
|
| 155 |
EMV cards
|
| 156 |
- src/ccid_serial.c: complete reimplementation of the Twin serial
|
| 157 |
protocol using a finite state automata (code much simpler)
|
| 158 |
|
| 159 |
0.3.0 - 10 September 2003, Ludovic Rousseau
|
| 160 |
- support of GemPC Twin connected to a serial port. Thanks to Niki
|
| 161 |
W. Waibel for a working prototype.
|
| 162 |
- support of auto voltage at power up if the reader support it
|
| 163 |
instead of forcing a 5V in all cases.
|
| 164 |
- support of APDU mode instead of just TPDU if the reader support
|
| 165 |
it. Thanks to Jean-Luc Giraud for the idea and inspiration I got
|
| 166 |
from his "concurrent" driver.
|
| 167 |
- support of "time request" from the card.
|
| 168 |
- parse: new indentation for more readability of supported features.
|
| 169 |
- switch the GemPC Key and GemPC Twin in APDU mode since they
|
| 170 |
support it but do not announce it in the dwFeatures.
|
| 171 |
- new build process using autoconf/automake.
|
| 172 |
|
| 173 |
0.2.0 - 26 August 2003, Ludovic Rousseau
|
| 174 |
- Works under MacOS X
|
| 175 |
- Info.plist: use an <array></array> for the alias enumeration
|
| 176 |
- Makefile rework for *BSD and MacOS X
|
| 177 |
|
| 178 |
0.1.0 - 13 August 2003, Ludovic Rousseau
|
| 179 |
- First public release
|
| 180 |
|
| 181 |
|
| 182 |
Bibliography:
|
| 183 |
=============
|
| 184 |
|
| 185 |
[1] http://www.usb.org/developers/devclass_docs/ccid_classspec_1_00a.pdf
|
| 186 |
[2] http://www.gemplus.com/products/gempc433/
|
| 187 |
[3] http://www.gemplus.com/products/gempckey/
|
| 188 |
[4] http://www.gemplus.com/products/gempctwin/
|
| 189 |
[5] http://www.omnikey.com/en/produkt_details.php3?produkt=1&variante=47
|
| 190 |
[6] http://www.scmmicro.com/security/SCR331.html
|
| 191 |
[7] http://www.scmmicro.com/security/SCR335.html
|
| 192 |
[8] http://www.c3po.es/pcsc.htm
|
| 193 |
[9] http://www.scmmicro.com/security/SPR532.html
|
| 194 |
[10] http://www.activcard.com/products/usb_reader.html
|
| 195 |
|
| 196 |
$Id$
|
| 197 |
|
| 198 |
vim:ts=20
|