| 1 |
Perl interface to the PC/SC smart card library |
| 2 |
============================================== |
| 3 |
|
| 4 |
This package contains a Perl wrapper to the PC/SC smartcard library |
| 5 |
(pcsc-lite) [1] from MUSCLE [2] together with some small examples. |
| 6 |
|
| 7 |
You can find applications using this wrapper in the pcsc-tools package |
| 8 |
[3]. |
| 9 |
|
| 10 |
[1] http://pcsclite.alioth.debian.org/ |
| 11 |
[2] http://www.musclecard.com/ |
| 12 |
[3] http://ludovic.rousseau.free.fr/softwares/pcsc-tools/ |
| 13 |
|
| 14 |
|
| 15 |
Build and Install: |
| 16 |
================== |
| 17 |
|
| 18 |
A very quick documentation on how to build and install the wrapper. |
| 19 |
|
| 20 |
$ perl Makefile.PL |
| 21 |
$ make |
| 22 |
|
| 23 |
Insert a smart card in the (first) PCSC reader |
| 24 |
|
| 25 |
$ make test |
| 26 |
$ sudo make install |
| 27 |
|
| 28 |
|
| 29 |
Remarks: |
| 30 |
======== |
| 31 |
|
| 32 |
For Windows users: |
| 33 |
|
| 34 |
Status behaves different on Unix and from Win32 |
| 35 |
it returns the Atr len |
| 36 |
it does not return any error like |
| 37 |
|
| 38 |
|
| 39 |
Authors: |
| 40 |
======== |
| 41 |
|
| 42 |
- Lionel VICTOR for the main part of the job |
| 43 |
- Ludovic ROUSSEAU for the debug and maintainance |
| 44 |
|
| 45 |
|
| 46 |
Licences: |
| 47 |
========= |
| 48 |
|
| 49 |
pcsc-perl: wrapper to the PC/SC smartcard library |
| 50 |
Copyright (C) 2001-2003 Lionel VICTOR |
| 51 |
Copyright (C) 2001-2010 Ludovic ROUSSEAU |
| 52 |
|
| 53 |
This program is free software; you can redistribute it and/or modify |
| 54 |
it under the terms of the GNU General Public License as published by |
| 55 |
the Free Software Foundation; either version 2 of the License, or |
| 56 |
(at your option) any later version. |
| 57 |
|
| 58 |
This program is distributed in the hope that it will be useful, |
| 59 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 60 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 61 |
GNU General Public License for more details. |
| 62 |
|
| 63 |
You should have received a copy of the GNU General Public License |
| 64 |
along with this program; if not, write to the Free Software |
| 65 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 66 |
|
| 67 |
|
| 68 |
History: |
| 69 |
======== |
| 70 |
|
| 71 |
1.4.15 - 18 November 2023, Ludovic ROUSSEAU |
| 72 |
- add support of SCARD_W_SECURITY_VIOLATION error code |
| 73 |
|
| 74 |
1.4.14 - 19 November 2015, Ludovic ROUSSEAU |
| 75 |
- Fix _StringifyError() on Mac OS X. The string version of |
| 76 |
PCSC::errno now works. |
| 77 |
|
| 78 |
1.4.13 - 1 April 2013, Ludovic ROUSSEAU |
| 79 |
- Fix a warning with Perl 5.16 |
| 80 |
|
| 81 |
1.4.12 - 6 March 2011, Ludovic ROUSSEAU |
| 82 |
- Also check for SVt_PVIV and not just SVt_IV. |
| 83 |
Fixes Debian bug #613722 "libpcsc-perl: GetStatusChange error after print" |
| 84 |
|
| 85 |
1.4.11 - 27 October 2010, Ludovic ROUSSEAU |
| 86 |
- Do not use SCardSetTimout() since it is no more present in |
| 87 |
pcsc-lite > 1.6.4 |
| 88 |
|
| 89 |
1.4.10 - 18 August 2010, Ludovic ROUSSEAU |
| 90 |
- Use LPSCARD_READERSTATE instead of LPSCARD_READERSTATE_A since it |
| 91 |
is no more defined in pcsc-lite >= 1.6.2 |
| 92 |
|
| 93 |
1.4.9 - 30 June 2010, Ludovic ROUSSEAU |
| 94 |
- remove reference to SCARD_W_INSERTED_CARD since it is no more |
| 95 |
define in pcsc-lite 1.6.0 Thanks to Olivier Huber for the bug |
| 96 |
report |
| 97 |
|
| 98 |
1.4.8 - 23 September 2009, Ludovic ROUSSEAU |
| 99 |
- minor bugs fixed |
| 100 |
|
| 101 |
1.4.7 - 26 March 2008, Ludovic ROUSSEAU |
| 102 |
- merge all the Makefile.PL.* in Makefile.PL |
| 103 |
|
| 104 |
1.4.6 - 7 March 2007, Ludovic ROUSSEAU |
| 105 |
- add support of GNU/kFreeBSD |
| 106 |
|
| 107 |
1.4.5 - 2 March 2007, Ludovic ROUSSEAU |
| 108 |
- remove some pcsc-lite specific constants to make it compile |
| 109 |
against pcsc-lite 1.4.0 |
| 110 |
|
| 111 |
1.4.4 - 12 August 2006, Ludovic ROUSSEAU |
| 112 |
- add support of extended APDU |
| 113 |
|
| 114 |
1.4.3 - 16 May 2006, Ludovic ROUSSEAU |
| 115 |
- update for Mac OS X Tiger |
| 116 |
|
| 117 |
1.4.2 - 6 August 2004, Ludovic ROUSSEAU |
| 118 |
- allow to use SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1 as the protocol |
| 119 |
this is used by gscriptor 1.4.0 |
| 120 |
|
| 121 |
1.4.1 - 4 July 2004, Ludovic ROUSSEAU |
| 122 |
- Card/Card.pm: |
| 123 |
. ISO7816Error(): return an error if given $sw if not 5 chars long |
| 124 |
"xx xx" |
| 125 |
. Transmit(): return (undef) if the protocol is not defined. This |
| 126 |
happens if you change a T=0 card with a T=1 (or vice versa) and |
| 127 |
try to exchange an APDU without disconnecting first. |
| 128 |
- PCSCperl.h: replace LPCSTR by LPCTSTR (pcsc-lite 1.2.9 beta4) |
| 129 |
|
| 130 |
1.4.0 - 20 May 2004, Ludovic ROUSSEAU |
| 131 |
- use a new Control() API to reflect the change in SCardControl() in |
| 132 |
pcsc-lite. We now have |
| 133 |
$RecvData = $hCard->Control($control_code, \@SendData); |
| 134 |
- load libpcsclite.so.1 instead of libpcsclite.so.0 |
| 135 |
|
| 136 |
1.3.1 - 2 April 2004, Ludovic ROUSSEAU |
| 137 |
- do not use PCSCLITE_MAX_CHANNELS anymor since it is no more |
| 138 |
defined by pcsc-lite > 1.2.0 and is not defined under Windows |
| 139 |
- test.pl: add demo code for GetStatusChange() |
| 140 |
- PCSC.pod: document GetStatusChange() |
| 141 |
- allow commands to be in the form "00A40100020100" instead of just |
| 142 |
"00 A4 01 0 0 02 01 00" |
| 143 |
|
| 144 |
1.3.0 - 13 December 2003, Ludovic ROUSSEAU |
| 145 |
- add support of SCardControl with $out = $hContext->Control (\@in); |
| 146 |
Thanks to Andrew Kay. |
| 147 |
- more support of Windows PC/SC and compiler. |
| 148 |
Thanks to Andrew Kay and Troy Curtiss |
| 149 |
- array_to_ascii() returns an empty string for an empty list |
| 150 |
- add Makefile_win.PL for Windows |
| 151 |
- Card.pm: by default use T=0 | T=1 protocols instead of just T=0 |
| 152 |
|
| 153 |
1.2.2 - 27 May 2003, Ludovic ROUSSEAU |
| 154 |
- add two constant definitions in PCSC.pm. Thanks to Ville Skyttä |
| 155 |
for report and patch |
| 156 |
- add a PL_FILES section in Makefile*.PL to avoid problem since we |
| 157 |
have Makefile.PL and Makefile_OSX.PL. Again thanks goes to Ville |
| 158 |
Skyttä |
| 159 |
- Also thanks to Wolfgang Hommel for uploading the package to CPAN |
| 160 |
and registering the official name Chipcard::PCSC (Wolfgang is |
| 161 |
maintainer of the Chipcard::CTAPI wrapper) |
| 162 |
|
| 163 |
1.2.1 - 24 May 2003, Ludovic ROUSSEAU |
| 164 |
- redesign the Makefile.PL to make the modules at least installable |
| 165 |
- add Card/Makefile.PL to also install Chipcard::PCSC::Card |
| 166 |
- modified test.pl to accept any SW in TransmitWithCheck |
| 167 |
|
| 168 |
1.2.0 - 9 May 2003, Ludovic ROUSSEAU |
| 169 |
- naming scheme migration from PCSC to Chipcard::PCSC |
| 170 |
- add TransmitWithCheck() and Chipcard::PCSC::Card::ISO7816Error() |
| 171 |
functions |
| 172 |
|
| 173 |
1.1.3 - 7 Nov 2002, Ludovic ROUSSEAU |
| 174 |
- small modifications to support Perl 5.8 |
| 175 |
|
| 176 |
1.1.2 - 28 Aug 2002, Ludovic ROUSSEAU |
| 177 |
- small modification to link against libpcsclite.so.0 instead of |
| 178 |
libpcsclite.so since libpcsclite.so should only be available on |
| 179 |
development platforms (-dev packages). |
| 180 |
|
| 181 |
1.1.1 - 7 Mar 2002, Ludovic ROUSSEAU |
| 182 |
- small typesetting modifications od .pod files |
| 183 |
|
| 184 |
1.1.0 - 6 Mar 2002, Ludovic ROUSSEAU |
| 185 |
- create this README file with the history |
| 186 |
- complete reindentation of .pod files |
| 187 |
|
| 188 |
1.0.9 - 5 Mar 2002, Ludovic ROUSSEAU |
| 189 |
- the minium APDU length is 4 bytes and not 5 |
| 190 |
- correctly test if a digit is hexa or not |
| 191 |
|
| 192 |
1.0.8 - 18 Oct 2001, Ludovic ROUSSEAU |
| 193 |
|