| 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
| 3 |
|
| 4 |
<html>
|
| 5 |
<head>
|
| 6 |
<title>CCID free software driver</title>
|
| 7 |
<meta name="description" content="CCID free software driver">
|
| 8 |
<link rel="stylesheet" type="text/css" href="default.css">
|
| 9 |
</head>
|
| 10 |
|
| 11 |
<body>
|
| 12 |
<h1>CCID free software driver</h1>
|
| 13 |
|
| 14 |
<p>This package provides the source code for a generic <acronym
|
| 15 |
title="Universal Serial Bus">USB</acronym> <acronym
|
| 16 |
title="Chip/Smart Card Interface Devices">CCID</acronym>
|
| 17 |
(Chip/Smart Card Interface Devices) driver and <acronym title="Integrated Circuit(s) Card Devices"> ICCD</acronym> (Integrated
|
| 18 |
Circuit(s) Card Devices).</p>
|
| 19 |
|
| 20 |
<p>See the USB <a href=
|
| 21 |
"http://www.usb.org/developers/devclass_docs/DWG_Smart-Card_CCID_Rev110.pdf">
|
| 22 |
CCID</a> and <a
|
| 23 |
href="http://www.usb.org/developers/devclass_docs/DWG_Smart-Card_USB-ICC_ICCD_rev10.pdf">ICCD</a>
|
| 24 |
specifications from the <a href= "http://www.usb.org/">USB working
|
| 25 |
group</a>.</p>
|
| 26 |
|
| 27 |
<h2>Source download</h2>
|
| 28 |
|
| 29 |
<p>11 October 2011, <a href=
|
| 30 |
"https://alioth.debian.org/frs/?group_id=30105&release_id=1747">ccid-1.4.5</a>,
|
| 31 |
<a href=
|
| 32 |
"http://anonscm.debian.org/viewvc/pcsclite/tags/ccid/ccid-1.4.5/README?view=markup">README</a>.</p>
|
| 33 |
|
| 34 |
<p>You can also access the <a
|
| 35 |
href="http://anonscm.debian.org/viewvc/pcsclite/trunk/Drivers/ccid/">Subversion
|
| 36 |
developement version</a>. You may need to use the <a
|
| 37 |
href="http://subversion.tigris.org/">Subversion</a> version to
|
| 38 |
support the latest added readers.</p>
|
| 39 |
|
| 40 |
<pre><code>svn checkout svn://anonscm.debian.org/pcsclite/trunk
|
| 41 |
cd Drivers/ccid
|
| 42 |
./bootstrap
|
| 43 |
./configure
|
| 44 |
make</code></pre>
|
| 45 |
|
| 46 |
<p><a href="http://flattr.com/thing/52836/CCID-free-software-driver"> <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width=100 height=17></a></p>
|
| 47 |
|
| 48 |
<h2>Main CCID/ICCD features supported</h2>
|
| 49 |
|
| 50 |
<ul>
|
| 51 |
<li>Exchange levels
|
| 52 |
<ul>
|
| 53 |
<li>short APDU</li>
|
| 54 |
<li>extended APDU (with some <a
|
| 55 |
href="ccid_extended_apdu.html">limitations</a> and <a href="http://ludovicrousseau.blogspot.com/2011/05/extended-apdu-status-per-reader.html">lack of support from PC/SC</a>)</li>
|
| 56 |
<li>TPDU</li>
|
| 57 |
<li>character</li>
|
| 58 |
</ul>
|
| 59 |
</li>
|
| 60 |
<li>multi-slot readers</li>
|
| 61 |
<li>composite CCID devices</li>
|
| 62 |
<li>PC/SC v2 part 10 <a href="http://anonscm.debian.org/viewvc/pcsclite/trunk/Drivers/ccid/SCARDCONTOL.txt?view=markup">features</a>:
|
| 63 |
<ul>
|
| 64 |
<li>GET_FEATURE_REQUEST</li>
|
| 65 |
<li>secure PIN verify (FEATURE_VERIFY_PIN_DIRECT)</li>
|
| 66 |
<li>modify PIN entry (FEATURE_MODIFY_PIN_DIRECT)</li>
|
| 67 |
<li>reader PIN properties (FEATURE_IFD_PIN_PROPERTIES)</li>
|
| 68 |
<li>Multifunctional Card Terminal reader direct (FEATURE_MCT_READER_DIRECT)</li>
|
| 69 |
<li>retrieve reader properties in TLV form (FEATURE_GET_TLV_PROPERTIES)
|
| 70 |
<ul>
|
| 71 |
<li><a href="http://ludovicrousseau.blogspot.com/2010/05/how-to-know-pin-sizes-supported-by.html">bMinPINSize and bMaxPINSize</a>: How to know the PIN sizes supported by a pinpad reader?</li>
|
| 72 |
<li><a href="http://ludovicrousseau.blogspot.com/2010/05/how-to-know-pin-sizes-supported-by.html">bEntryValidationCondition</a></li>
|
| 73 |
<li><a
|
| 74 |
href="http://ludovicrousseau.blogspot.com/2011/10/featureccidesccommand.html">bPPDUSupport</a></li>
|
| 75 |
<li>sFirmwareID</li>
|
| 76 |
<li>bTimeOut2</li>
|
| 77 |
<li>wLcdMaxCharacters and wLcdMaxLines</li>
|
| 78 |
<li>wLcdLayout</li>
|
| 79 |
</ul></li>
|
| 80 |
<li>send CCID escape commands (<a
|
| 81 |
href="http://ludovicrousseau.blogspot.com/2011/10/featureccidesccommand.html">FEATURE_CCID_ESC_COMMAND</a>)</li>
|
| 82 |
</ul></li>
|
| 83 |
<li>Data rates list</li>
|
| 84 |
<li>Localize LCD display messages (Gemalto GemPC PIN PAD, Covadis Véga-Alpha)</li>
|
| 85 |
<li>Extended APDU (for T=1 cards only and if your reader is in TPDU
|
| 86 |
mode or extended APDU mode)</li>
|
| 87 |
<li>SCardGetAttrib() <a
|
| 88 |
href="http://anonscm.debian.org/viewvc/pcsclite/trunk/Drivers/ccid/SCARDGETATTRIB.txt?view=markup">attributes</a></li>
|
| 89 |
<li>ICCD versions A and B</li>
|
| 90 |
<li><a href="http://ludovicrousseau.blogspot.com/2011/04/libccid-and-usb-selective-suspend.html">USB selective suspend</a></li>
|
| 91 |
</ul>
|
| 92 |
|
| 93 |
<h2><a name="not_yet_supported"></a>
|
| 94 |
CCID features not yet supported</h2>
|
| 95 |
<ul>
|
| 96 |
<li>Manage suspend/resume (for example in a laptop)</li>
|
| 97 |
<li>Reader clock frequency change</li>
|
| 98 |
</ul>
|
| 99 |
|
| 100 |
<p>Contact <a href="mailto:ludovic.rousseau@free.fr">me</a> if you
|
| 101 |
want to see the support of the above <a href="#not_yet_supported">not
|
| 102 |
yet supported features</a> and you have a budget.</p>
|
| 103 |
|
| 104 |
<h2>Non CCID features that I do not plan to support</h2>
|
| 105 |
<ul>
|
| 106 |
<li>read/write on memory cards</li>
|
| 107 |
</ul>
|
| 108 |
|
| 109 |
<p>In fact I may implement one of these features if you have a budget.</p>
|
| 110 |
|
| 111 |
<h2><a name="support"></a>
|
| 112 |
Sending usefull logs</h2>
|
| 113 |
|
| 114 |
<p>If you have a problem and want to get <a
|
| 115 |
href="#support">support</a> from me you shall include the
|
| 116 |
following information:</p>
|
| 117 |
|
| 118 |
<h3>Versions</h3>
|
| 119 |
|
| 120 |
<ul>
|
| 121 |
<li>CCID driver version</li>
|
| 122 |
<li>pcsc-lite version</li>
|
| 123 |
<li>smart card reader name</li>
|
| 124 |
<li>the output of the command "<code>/usr/sbin/pcscd
|
| 125 |
--version</code>"</li>
|
| 126 |
</ul>
|
| 127 |
|
| 128 |
<h3>Platform</h3>
|
| 129 |
|
| 130 |
<ul>
|
| 131 |
<li>Operating system name and version</li>
|
| 132 |
<li>Smart card middleware name and version</li>
|
| 133 |
<li>Reader manufacturer name and reader model name</li>
|
| 134 |
<li>Smart card name</li>
|
| 135 |
</ul>
|
| 136 |
|
| 137 |
<h3>Log</h3>
|
| 138 |
|
| 139 |
<p>Then you shall generate a complete log.</p>
|
| 140 |
|
| 141 |
<ul>
|
| 142 |
<li>Kill any running <code>pcscd</code> process</li>
|
| 143 |
|
| 144 |
<li>(re)start pcscd <b>exactly</b> as described bellow:
|
| 145 |
<pre><code>sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu | tee log.txt</code></pre>
|
| 146 |
</li>
|
| 147 |
|
| 148 |
<li>Stop pcscd (using Control-C) <b>after</b> the problem occured and
|
| 149 |
send me the generated <code>log.txt</code> file</li>
|
| 150 |
|
| 151 |
</ul>
|
| 152 |
|
| 153 |
<p><a href="http://flattr.com/thing/52836/CCID-free-software-driver"> <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width=100 height=17></a></p>
|
| 154 |
|
| 155 |
<h2>Mailing list</h2>
|
| 156 |
|
| 157 |
<p>If you have general questions or bug reports you should use the
|
| 158 |
<a href="http://musclecard.com/list.html">MUSCLE</a> mailing list:
|
| 159 |
<tt>muscle@lists.musclecard.com</tt>.</p>
|
| 160 |
|
| 161 |
<p>First search the mailing list <a
|
| 162 |
href="http://archives.neohapsis.com/archives/dev/muscle/">archives</a>.
|
| 163 |
Maybe your probem has already been reported and solved. If you have
|
| 164 |
not found a solution then write to
|
| 165 |
<tt>muscle@lists.musclecard.com</tt> with a
|
| 166 |
description of your problem.</p>
|
| 167 |
|
| 168 |
<h2><a name="CCID_compliant"></a>
|
| 169 |
Compliant readers</h2>
|
| 170 |
|
| 171 |
<p>To <a href="#CCID_compliant">know</a> if a smart card reader is
|
| 172 |
CCID compliant and should be supported by this driver but is not
|
| 173 |
listed bellow</p>
|
| 174 |
|
| 175 |
<p>Just get the <a
|
| 176 |
href="https://alioth.debian.org/project/showfiles.php?group_id=30105">source
|
| 177 |
code</a> of this driver and do:</p>
|
| 178 |
<pre><code>tar xjvf ccid-x.y.z.tar.bz2
|
| 179 |
cd ccid-x.y.z
|
| 180 |
./configure
|
| 181 |
make
|
| 182 |
sudo ./src/parse > output.txt</code></pre>
|
| 183 |
<p>and <b>send me (ludovic.rousseau@free.fr) the generated
|
| 184 |
<code>output.txt</code> file</b>.</p>
|
| 185 |
|
| 186 |
<p>If your reader is CCID compliant and you would like to add it to
|
| 187 |
the list of readers I would <i>also</i> need:</p>
|
| 188 |
<ul>
|
| 189 |
<li>The URL of a web page describing the reader. Typically the
|
| 190 |
web page of the reader description on the manufacturer web site.</li>
|
| 191 |
|
| 192 |
<li>A picture of the reader. In general a picture is already
|
| 193 |
available on the manufacturer web page described above.</li>
|
| 194 |
</ul>
|
| 195 |
|
| 196 |
<p><a href="http://flattr.com/thing/52836/CCID-free-software-driver"> <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width=100 height=17></a></p>
|
| 197 |
|
| 198 |
<h2>CCID/ICCD readers</h2>
|
| 199 |
|
| 200 |
<ul>
|
| 201 |
<li><a href="ccid/supported.html">Supported</a> readers</li>
|
| 202 |
<li><a href="ccid/shouldwork.html">Should work</a> readers</li>
|
| 203 |
<li><a href="ccid/unsupported.html">Unsupported</a> readers</li>
|
| 204 |
<li><a href="ccid/disabled.html">Disabled</a> readers</li>
|
| 205 |
</ul>
|
| 206 |
|
| 207 |
<p>All the readers are also included in a <a href="ccid/section.html">big matrix</a>.</p>
|
| 208 |
|
| 209 |
<h2>Authors</h2>
|
| 210 |
|
| 211 |
<p>The main author is <b>Ludovic Rousseau</b>
|
| 212 |
<tt><ludovic.rousseau@free.fr></tt>.</p>
|
| 213 |
|
| 214 |
<p>I reused source code from other free software projects whose
|
| 215 |
authors are:</p>
|
| 216 |
<ul>
|
| 217 |
<li>Carlos Prados for the PPS and ATR parsing code (taken from his
|
| 218 |
towitoto driver) in <code>towitoko/</code> directory.</li>
|
| 219 |
|
| 220 |
<li>Olaf Kirch for the T=1 TPDU code (from the OpenCT package) in
|
| 221 |
<code>openct/</code> directory. I (Ludovic Rousseau) greatly improved this
|
| 222 |
code.</li>
|
| 223 |
|
| 224 |
</ul>
|
| 225 |
|
| 226 |
<h2>Licence</h2>
|
| 227 |
<pre>
|
| 228 |
This library is free software; you can redistribute it and/or modify it
|
| 229 |
under the terms of the GNU Lesser General Public License as published by
|
| 230 |
the Free Software Foundation; either version 2.1 of the License, or (at
|
| 231 |
your option) any later version.
|
| 232 |
|
| 233 |
This library is distributed in the hope that it will be useful, but
|
| 234 |
WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 235 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
|
| 236 |
General Public License for more details.
|
| 237 |
|
| 238 |
You should have received a copy of the GNU Lesser General Public License
|
| 239 |
along with this library; if not, write to the Free Software Foundation,
|
| 240 |
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 241 |
</pre>
|
| 242 |
|
| 243 |
<h2>Supported and unsupported operating systems</h2>
|
| 244 |
|
| 245 |
<h3>GNU/Linux</h3>
|
| 246 |
|
| 247 |
<p>GNU/Linux using libusb 1.0.x and later</p>
|
| 248 |
|
| 249 |
<h3><a name="MacOSX"></a>
|
| 250 |
<a href="#MacOSX">Mac OS X</a></h3>
|
| 251 |
|
| 252 |
<h4>Leopard (10.5.6) and newer</h4>
|
| 253 |
|
| 254 |
<p>Apple now includes my CCID driver (version 1.3.8) since Leopard
|
| 255 |
10.5.6. See the <a
|
| 256 |
href="http://lists.apple.com/archives/Apple-cdsa/2008/Dec/msg00039.html">mail</a>
|
| 257 |
from Shawn Geddis to have a list of changes.</p>
|
| 258 |
|
| 259 |
<p>Since the version 1.3.8 of the driver is now a bit old you may
|
| 260 |
want to recompile a newer version of the driver yourself. To see
|
| 261 |
which readers are supported in version 1.3.8 go to <a
|
| 262 |
href="release.html">this page</a> and check the release
|
| 263 |
column.</p>
|
| 264 |
|
| 265 |
<h4>Snow Leopard (10.6.x)</h4>
|
| 266 |
|
| 267 |
<p>Mac OS X Leopard (10.6) is supported without patches. To build
|
| 268 |
the driver you need to extract the archive and do:</p>
|
| 269 |
|
| 270 |
<pre><code>./MacOSX/configure
|
| 271 |
make
|
| 272 |
sudo make install</code></pre>
|
| 273 |
|
| 274 |
<h4>Leopard (10.5)</h4>
|
| 275 |
|
| 276 |
<p>Mac OS X Leopard (10.5) is supported with a <a
|
| 277 |
href="patch_Leopard.txt">simple patch</a>. To build the driver
|
| 278 |
you need to extract the archive and do:</p>
|
| 279 |
|
| 280 |
<pre><code>./MacOSX/configure
|
| 281 |
make
|
| 282 |
sudo make install</code></pre>
|
| 283 |
|
| 284 |
<p>NOTE: The execution of <code>./MacOSX/configure</code> will fail if
|
| 285 |
you have a space character in your current working directory
|
| 286 |
pathname.</p>
|
| 287 |
|
| 288 |
<p>NOTE: Apple's version of pcsc-lite installed with Leopard has
|
| 289 |
<i>many</i> bugs and problems. See <a
|
| 290 |
href="http://www.opensc-project.org/sca/wiki/LeopardBugs">LeopardBugs</a>
|
| 291 |
for a list of known bugs.</p>
|
| 292 |
|
| 293 |
<h4>Tiger (10.4)</h4>
|
| 294 |
|
| 295 |
<p>Mac OS X Tiger (10.4) uses an old pcsc-lite with some problems:
|
| 296 |
<ul>
|
| 297 |
<li>A missing call to IFDHSetProtocolParameters() so the reader
|
| 298 |
is not configured correctly regarding to the card ATR.</li>
|
| 299 |
|
| 300 |
<li>A wrong API for SCardControl() so you can't use a pin pad
|
| 301 |
reader or any other feature provided by SCardControl().</li>
|
| 302 |
|
| 303 |
<li>No way to generate a cold reset. Only a warm reset is
|
| 304 |
possible. Uncomment the line <code>#CFLAGS="$CFLAGS
|
| 305 |
-DFAKE_CARD_CHANGED"</code> in <code>MacOSX/configure</code> to
|
| 306 |
fake a card movement after a reset to simulate a cold
|
| 307 |
reset. Note that <code>SCardReconnect()</code> will then fail with
|
| 308 |
<code>SCARD_W_REMOVED_CARD</code>.</li>
|
| 309 |
|
| 310 |
</ul>
|
| 311 |
<p>You can use this (now unmaintained) <a
|
| 312 |
href="old-SCardControl_patch.txt">patch</a>.</p>
|
| 313 |
|
| 314 |
<h3>Solaris</h3>
|
| 315 |
|
| 316 |
<p>The driver should work on Solaris.</p>
|
| 317 |
|
| 318 |
<p>I can't test is myself so patches are welcome if needed.</p>
|
| 319 |
|
| 320 |
<p>You can find a <a
|
| 321 |
href="http://www.sun.com/download/index.jsp?tab=2#P">PC/SC-lite</a>
|
| 322 |
package form Oracle.</p>
|
| 323 |
|
| 324 |
<h3>FreeBSD</h3>
|
| 325 |
|
| 326 |
<p>The driver is available in the <a
|
| 327 |
href="http://www.freebsdsoftware.org/devel/libccid.html">libccid</a>
|
| 328 |
package or this <a
|
| 329 |
href="http://www.freshports.org/devel/libccid">freshport</a>.</p>
|
| 330 |
|
| 331 |
<h3>Other operating systems</h3>
|
| 332 |
|
| 333 |
<p>It may or may not work.</p>
|
| 334 |
|
| 335 |
<h2>Available binaries</h2>
|
| 336 |
|
| 337 |
<p>The drivers are also available as <a href=
|
| 338 |
"http://www.debian.org/"><img
|
| 339 |
src="img/Logo_Debian.png" alt="debian" width=179 height=61>
|
| 340 |
</a> packages <a href=
|
| 341 |
"http://packages.debian.org/libccid">libccid</a>
|
| 342 |
|
| 343 |
and <a href="http://fedoraproject.org/"><img
|
| 344 |
src="img/Logo_fedora.png"
|
| 345 |
alt="logo fedora" width=200 height=61></a>
|
| 346 |
<a
|
| 347 |
href="http://cvs.fedoraproject.org/viewvc/rpms/ccid/">source</a> or <a
|
| 348 |
href="http://download.fedora.redhat.com/pub/fedora/linux/development/">package.</a></p>
|
| 349 |
|
| 350 |
<hr>
|
| 351 |
|
| 352 |
<p>
|
| 353 |
<a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
|
| 354 |
<a href="http://jigsaw.w3.org/css-validator/"><img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
|
| 355 |
<tt>$Id$</tt>
|
| 356 |
</p>
|
| 357 |
|
| 358 |
<script type="text/javascript">
|
| 359 |
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
| 360 |
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
| 361 |
</script>
|
| 362 |
<script type="text/javascript">
|
| 363 |
try {
|
| 364 |
var pageTracker = _gat._getTracker("UA-2404298-2");
|
| 365 |
pageTracker._trackPageview();
|
| 366 |
} catch(err) {}</script>
|
| 367 |
</body>
|
| 368 |
</html>
|
| 369 |
|