New upstream version 1.4.32

This commit is contained in:
Ludovic Rousseau 2020-04-22 11:29:14 +02:00
parent e1844232e3
commit a80fcee9aa
31 changed files with 1120 additions and 139 deletions

693
ChangeLog
View File

@ -1,4 +1,689 @@
commit 743e9a9daf4dd27128eb6be8b13562f0ea695fd5 (HEAD -> master, tag: ccid-1.4.31)
commit 8f33a2ff60919f579ee17012e91f927491ef70be (HEAD -> master, tag: ccid-1.4.32, origin/master, origin/HEAD)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Apr 22 11:14:30 2020 +0200
ylwrap: updated version
Only the Copyright date changed.
ylwrap | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 6d5c45d826219ded210e0dcf0038ccb632b036a9 (zotac/master)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Apr 22 11:12:28 2020 +0200
Release 1.4.32
README.md | 41 +++++++++++++++++++++++++++++++++++++++++
configure.ac | 2 +-
2 files changed, 42 insertions(+), 1 deletion(-)
commit aa13542bf4c83c8bc08e10db49bbe6549ec2b59d
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Apr 20 18:49:54 2020 +0200
SCARDGETATTRIB.txt: document SCARD_ATTR_CHANNEL_ID
SCARDGETATTRIB.txt | 5 +++++
1 file changed, 5 insertions(+)
commit ecc9c0d322a66dcaded69b683f23ee1eec06e9b1
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Apr 19 16:43:03 2020 +0200
macOS: fix compiler warning
scardcontrol.c:688:40: warning: format specifies type 'long' but the argument
has type 'DWORD' (aka 'unsigned int') [-Wformat]
printf(" card response [%ld bytes]:", length);
~~~ ^~~~~~
%u
examples/scardcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 47746f0bc00c3cdedb1f40ece3996a9a4dde9d2b
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Apr 19 16:40:04 2020 +0200
Fix compiler warning
scardcontrol.c:234:8: warning: variable ccid_esc_command set but not used [-Wunused-but-set-variable]
234 | DWORD ccid_esc_command = 0;
| ^~~~~~~~~~~~~~~~
examples/scardcontrol.c | 2 ++
1 file changed, 2 insertions(+)
commit b53791685c71ff65919c8dee65fa5a4be3e48172
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Apr 19 16:38:02 2020 +0200
Fix compiler warning
scardcontrol.c:686:27: warning: format %d expects argument of type int, but argument 2 has type DWORD {aka long unsigned int} [-Wformat=]
686 | printf(" card response [%d bytes]:", length);
| ~^ ~~~~~~
| | |
| int DWORD {aka long unsigned int}
| %ld
examples/scardcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit ce899b991d5ee7857eb337ef4947ab30f280d3eb
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Thu Apr 16 13:52:05 2020 +0200
Revert back to .device_address instead of .port_number
The port number is hard to use. For example when you use a USB hub you
can have 2 devices on port 1.
The real solution with port is to use libusb_get_port_numbers() to get a
list of ports. But we can only return one byte with SCARD_ATTR_CHANNEL_ID.
The device address is easy to use. If you know the bus number and
device address you can uniquely identify a USB device on GNU/Linux.
Example:
With SCardGetAttrib.py I get:
0x20110 [8, 1, 32, 0] 08 01 20 00 .. .
USB: bus: 1, addr: 8
$ lsusb -s 1:8
Bus 001 Device 008: ID 08e6:3437 Gemalto (was Gemplus) GemPC Twin SmartCard Reader
src/ccid_usb.c | 8 +++-----
src/ccid_usb.h | 2 +-
src/ifdhandler.c | 2 +-
3 files changed, 5 insertions(+), 7 deletions(-)
commit 9a8eb8bab47d4f96ac679964aa0903b0140cbfd1
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Apr 15 11:43:01 2020 +0200
ccid_usb: No need to make 3 function EXTERNAL
EXTERNAL is only for symbols exported and used by pcscd.
src/ccid_usb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
commit 0c61799570cf0da69b332a89068b935fd361dee8
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Apr 15 11:38:18 2020 +0200
Minor code reformat
src/ccid_usb.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
commit 5f3c37f63715480b7bba04a81f810b5fc40f43bb
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Apr 15 11:35:45 2020 +0200
Rename get_ccid_usb_device_address() in get_ccid_usb_port_number()
What we get is the USB port number so use a correct name for the
function.
src/ccid_usb.c | 2 +-
src/ccid_usb.h | 2 +-
src/ifdhandler.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
commit 810b5502b81320132423fa861577c8c9f44bd4b6
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Apr 15 11:21:15 2020 +0200
SCARD_ATTR_CHANNEL_ID: use port number instead of device address
The device address field is a number that is increasing after each USB
device plug-in. It is NOT related to a physical USB port.
It is the Device: number returned by lsusb(1):
Bus 001 Device 021: ID 08e6:3437 Gemalto (was Gemplus) GemPC Twin SmartCard Reader
The port number is related to a USB physical port and is stable if you
unplug and replug a USB device on the same port.
According to libusb_get_port_number() API documentation:
Get the number of the port that a device is connected to. Unless the
OS does something funky, or you are hot-plugging USB extension cards,
the port number returned by this call is usually guaranteed to be
uniquely tied to a physical port, meaning that different devices
plugged on the same physical port should return the same port number.
But outside of this, there is no guarantee that the port number
returned by this call will remain the same, or even match the order in
which ports have been numbered by the HUB/HCD manufacturer.
src/ccid_usb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
commit 4c8c809751211d35f4d417e1b086a554a79fd6e6 (github/master, usb)
Author: Stephan Guilloux (home) <stephan.guilloux@crisalid.com>
Date: Tue Apr 14 13:19:45 2020 +0200
Add #ifdef for TWINSERIAL
Newly introduced functions get_ccid_usb_XXX() are not available with
./configure --enable-twinserial.
src/ifdhandler.c | 2 ++
1 file changed, 2 insertions(+)
commit 1b4c6ac5b2bed4e48fb59d4abaa96a1a76fa8161
Author: Stephan Guilloux (home) <stephan.guilloux@crisalid.com>
Date: Mon Apr 13 19:01:30 2020 +0200
Add SCARD_ATTR_CHANNEL_ID for USB devices.
src/ccid_usb.c | 8 ++++++++
src/ccid_usb.h | 3 +++
src/ifdhandler.c | 11 +++++++++++
3 files changed, 22 insertions(+)
commit da1673383e7b6c809c7abebdefb6caed0069d314
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Mar 31 14:53:13 2020 +0200
Add F-Secure Foundry USB Armory Mk II
readers/F-Secure_Foundry_USB_Armory_Mk_II.txt | 56 +++++++++++++++++++++++++++
readers/supported_readers.txt | 5 ++-
2 files changed, 60 insertions(+), 1 deletion(-)
commit 745c4efe214c1d3024b9cc62d52a653548c79818
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Mar 24 17:51:18 2020 +0100
Add Doctolib SR with idProduct: 0xAFD3
readers/Doctolib-SR-0xAFD3.txt | 57 ++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit 27c89b2136e726b2df7cacd5ab659dcc3b9d28b3
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Mar 24 17:50:18 2020 +0100
Add Doctolib SR with idProduct: 0xAFD2
readers/Doctolib-SR-0xAFD2.txt | 57 ++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit a76837fa78a4a1a8bcaed3a181c314e572b9f527
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Mar 24 17:49:09 2020 +0100
Add Doctolib SR with idProduct: 0xAFD1
readers/Doctolib-SR-0xAFD1.txt | 57 ++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit 27d9a847f33297125fdac28863818c8a36c4161a
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Mar 24 17:47:49 2020 +0100
Add Doctolib SR with idProduct: 0xAFD0
readers/Doctolib-SR-0xAFD0.txt | 57 ++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 5 +++-
2 files changed, 61 insertions(+), 1 deletion(-)
commit 84c1bca67b0cbffe014175a0bcc0cb7dfcc547ac
Author: Erki Aring <erki@example.ee>
Date: Tue Feb 18 22:10:11 2020 +0200
Disable pinpad for Chicony HP Skylab USB Smartcard Keyboard
Chicony HP Skylab Smartcard Keyboard have symptoms similar to other HP
keyboards - USB descriptor advertises pinpad support but no pinpad is
actually available, causing PIN entry to fail.
Disabling pinpad fixes the problem.
src/ccid.c | 1 +
src/ccid.h | 1 +
2 files changed, 2 insertions(+)
commit 36313631b3bb15e7df295c8a73c881916973cce9
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 14:08:34 2020 +0100
Add AF Care Two (idProduct: 0xAFC3)
readers/AF_Care_Two_AFC3.txt | 57 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit 804df009969a5aa16874ab8346a216b229108a07
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 14:07:38 2020 +0100
Add AF Care Two (idProduct: 0xAFC2)
readers/AF_Care_Two_AFC2.txt | 57 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit 7e9f0776f6611100a84d31f466e27b18f9491c36
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 14:06:16 2020 +0100
Add AF Care One (idProduct: 0xAFC1)
readers/AF_Care_One_AFC1.txt | 57 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit 0041acca620fbd2a232921dbc87696b79125de72
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 14:05:13 2020 +0100
Add AF Care One (idProduct: 0xAFC0)
readers/AF_Care_One_AFC0.txt | 57 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 3 +++
2 files changed, 60 insertions(+)
commit 884f806888e012c6c75cbb180328cfcbbb92d6e4
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 13:58:56 2020 +0100
Add SpringCard H518 (idProduct: 0x6122)
readers/SpringCard_H518_6122.txt | 57 ++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit 11bd5287fbba084f4c91b17e9bfe212d16ccfd61
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 13:57:28 2020 +0100
Add SpringCard E518 (idProduct: 0x6112)
readers/SpringCard_E518_6112.txt | 57 ++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit a02f861f6966963b8e2ba421a55418209565fafa
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 13:56:03 2020 +0100
Add SpringCard SpringCore (idProduct: 0x6012)
readers/SpringCard_SpringCore_6012.txt | 57 ++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit be892726d5f79d22d4ffa50f50464e406ecf90f5
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 13:54:31 2020 +0100
Add SpringCard Puck (dProduct: 0x613A)
readers/SpringCard_Puck_613A.txt | 57 ++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit 70d62b408e11453ead38dde40b261906102a9b4b
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 13:52:02 2020 +0100
Add SpringCard H518 (idProduct: 0x612A)
readers/SpringCard_H518_612A.txt | 57 ++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit 9745ce7f73c39022970bace06db1596cf423c964
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 13:43:00 2020 +0100
Add SpringCard E518 (idProduct: 0x611A)
readers/SpringCard_E518_611A.txt | 57 ++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit d49e1a3440da7def1343355e4c1e62b588c741fb
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 13:39:08 2020 +0100
Add SpringCard SpringCore (idProduct: 0x601A)
readers/SpringCard_SpringCore_601A.txt | 57 ++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit ebd991f05c1ea2ba55bc431f624c7682c14ca623
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 13:25:43 2020 +0100
Add Purism, SPC Librem Key
readers/Purism_Librem_Key.txt | 51 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 3 +++
2 files changed, 54 insertions(+)
commit 022381bc5c36e8fd2637656fcac131f247fe4745
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Feb 8 13:11:54 2020 +0100
Add Gemalto RF CR5400
readers/Gemalto_RF_CR5400.txt | 57 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 3 ++-
2 files changed, 59 insertions(+), 1 deletion(-)
commit 27607e5e458fe4c6c04aa22bcdc70c5e4ffad55a
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Feb 5 15:53:49 2020 +0100
Add SpringCard Puck
readers/SpringCard_Puck.txt | 57 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 58 insertions(+)
commit 302560bc95f227f9e0110663fbffbef10607bf52
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Feb 5 15:52:35 2020 +0100
Gemalto PC Twin Reader (serial) has its own .txt file
So it generates a duplicate with the USB version.
readers/supported_readers.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
commit eca4ce4031f716a07256a740694045b317088493
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Jan 5 23:45:46 2020 +0100
Duplicate GemPCTwin.txt as GemPCTwinSerial.txt
We can't have the same key in double in an .ini file.
So we duplicate the reader with a different name.
readers/GemPCTwinSerial.txt | 90 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
commit 1ef5c4f3e4380f2b99213ff5ac1d4c2ad640593b
Merge: 6d11a64 c806579
Author: Ludovic Rousseau <rousseau@debian.org>
Date: Tue Dec 17 15:12:28 2019 +0000
Merge branch 'master' into 'master'
Add Ledger Nano X support
See merge request rousseau/CCID!2
commit 6d11a643cc782ffeafc4cf77d6ac3aa26f74ec82
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Dec 17 15:46:41 2019 +0100
Add support of min & max PIN size for the Omnikey 3821
PCSCv2_PART10_PROPERTY_bMinPINSize is 1
PCSCv2_PART10_PROPERTY_bMaxPINSize is 31
Thanks to Zoltan Kelemen for the patch.
src/ccid.h | 1 +
src/ifdhandler.c | 14 ++++++++++++++
2 files changed, 15 insertions(+)
commit c80657924666948a8ec3bab11375c8075b4654a3
Author: Aitor Pazos <mail@aitorpazos.es>
Date: Sun Dec 15 23:33:19 2019 +0000
Add Ledger Nano X support
readers/Ledger_Nano_X.txt | 55 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 56 insertions(+)
commit e69d383748b0e9190c53dc761771680bde51ecb9
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Dec 14 15:08:18 2019 +0100
scardcontrol: reverse the byte order of wLangId field
The value for "United States" is 0x0409 according to
https://docs.microsoft.com/en-us/windows/win32/intl/language-identifier-constants-and-strings
and http://www.baiheee.com/Documents/090518/090518112619/USB_LANGIDs.pdf
Thanks to Zoltan Kelemen for the bug report.
examples/scardcontrol.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit 0d98b3016f1526a410a68284e9bf49e1a2051ae6
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Thu Dec 12 21:39:17 2019 +0100
Fix a bNumberMessage issue with Cherry KC 1000 SC
The reader does not accept the value bNumberMessage = 0x00 and returns
an error. The value 0xFF (default CCID message(s)) is accepted so we use
it instead.
bNumberMessage = 0x00 is used by OpenSC for example because the device
is a keyboard and has no screen so no message to display.
Thanks to Zoltan Kelemen for the patch.
src/commands.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
commit 5d2b7ea3c7604c89c6b9e9edee2f62b8f13faab6
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Dec 11 15:26:27 2019 +0100
scardcontrol: add colors for SPE status (green/red)
If the PIN verification or modification fails then the error is
displayed in red instead of green.
examples/scardcontrol.c | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
commit 97853ccf4c25cece1e9b135ca5ccf8b571bceff5
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Dec 3 21:42:35 2019 +0100
Add support of min & max PIN size for the Cherry KC 1000 SC
PCSCv2_PART10_PROPERTY_bMinPINSize is 0
PCSCv2_PART10_PROPERTY_bMaxPINSize is 32
Thanks to Zoltan Kelemen for the patch.
src/ifdhandler.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
commit 437dd1780f2440b75bded71cf1e0c81c424af15a
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Nov 27 13:20:45 2019 +0100
Add Sysking MII136C
readers/Sysking_MII136C.txt | 48 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 5 ++++-
2 files changed, 52 insertions(+), 1 deletion(-)
commit d5125704189c837a28dfe102c0f28e992ca62596
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Nov 18 18:21:49 2019 +0100
Add Access IS ATR220
readers/Access_IS_ATR220.txt | 53 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 54 insertions(+)
commit ce7a6068b062337e2a516bedf2af352b341cf4ec
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Nov 18 18:19:59 2019 +0100
Add Access IS ATR210
readers/Access_IS_ATR210.txt | 53 +++++++++++++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 3 ++-
2 files changed, 55 insertions(+), 1 deletion(-)
commit 53289605dfb71e06f888264356c4e383d49f5f8f
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Nov 9 17:15:53 2019 +0100
configure.ac: fix autoreconf(1)
Add "foreign" to AM_INIT_AUTOMAKE()
It is now possible to use autoreconf(1) without error.
The problem was:
$ autoreconf
Makefile.am: error: required file './README' not found
autoreconf: automake failed with exit status: 1
Thanks to Zheng Ruoqin for the bug report and Harald Welte for the fix.
[Pcsclite-muscle] Bug fix for ccid-1.4.31
http://lists.infradead.org/pipermail/pcsclite-muscle/2019-November/001200.html
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit eeb97c03bce6852afb9e123ff85eab10d138cca5
Author: Achmad Yusri Afandi <linuxer08@gmail.com>
Date: Tue Oct 8 08:35:33 2019 +0800
README.md: Update CCID and ICCD specification URLs
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit f258ec912661decd536c2ff953898ff05d6f0325
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Oct 7 18:32:48 2019 +0200
Add SPECINFOSYSTEMS DIAMOND PRO token
readers/SPECINFOSYSTEMS_DIAMOND_PRO_token.txt | 52 +++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 53 insertions(+)
commit 465812c0de183f2af649185ec89cdca97b4c541d
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Oct 7 18:31:22 2019 +0200
Add SPECINFOSYSTEMS DIAMOND PLUS token
readers/SPECINFOSYSTEMS_DIAMOND_PLUS_token.txt | 56 ++++++++++++++++++++++++++
readers/supported_readers.txt | 1 +
2 files changed, 57 insertions(+)
commit b4c08f84c5fc8d8ead0e6c586869d1baba598dfc
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Oct 7 18:30:09 2019 +0200
Add SPECINFOSYSTEMS DIAMOND HSM
readers/SPECINFOSYSTEMS_DIAMOND_HSM.txt | 54 +++++++++++++++++++++++++++++++++
readers/supported_readers.txt | 3 +-
2 files changed, 56 insertions(+), 1 deletion(-)
commit f4938cd15771c830eaa6c865a10cf84b28652713
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Sep 28 13:42:58 2019 +0200
Fix "Bus Error" on SPARC64 CPU and Solaris C compiler
SPARC64 CPU can't access non-aligned words and generates a Bus Error.
The GCC C compiler detect this situation and uses bytes access instead.
The Solaris C compiler is not smart enough.
The problem is with the PIN_VERIFY_STRUCTURE, PIN_MODIFY_STRUCTURE and
PCSC_TLV_STRUCTURE structures.
These structures use "#pragma pack(1)" to remove any padding so some
fields are NOT aligned.
Thanks to Kenjiro Tsuji fro the bug report and initial patch
https://salsa.debian.org/rousseau/CCID/issues/7#note_111153
"ccid may perform integer access to unaligned address"
src/commands.c | 31 ++++++++++++++---------------
src/ifdhandler.c | 20 ++++++++++++-------
src/utils.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/utils.h | 6 ++++++
4 files changed, 94 insertions(+), 23 deletions(-)
commit 114af8b5102e34e1b027a813d92ba6a79fac32ca
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Sep 28 13:41:39 2019 +0200
scardcontrol: remove extra spaces in output
examples/scardcontrol.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
commit e8445ba124870d912efd54b801a822ab1e33c9ef
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Thu Sep 26 19:02:29 2019 +0200
Add Cherry GmbH CHERRY SECURE BOARD 1.0
readers/Cherry_CHERRY_SECURE_BOARD_1.0.txt | 56 ++++++++++++++++++++++++++++++
readers/supported_readers.txt | 3 +-
2 files changed, 58 insertions(+), 1 deletion(-)
commit 46b10d6ac1dbc47fefdc7c3fba7cf845b4b48c26
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue Sep 17 18:08:54 2019 +0200
readers/AU9540.txt: update
bcdCCID: changed from 1.00 to 1.10
readers/AU9540.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit 4c11649291616077c9083a035a8b3c7450f12536
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sun Sep 1 13:04:31 2019 +0200
ccid_open_hack_pre(): fix bug for ICCD type A & B devices
The CmdPowerOn() used a wrong value for voltage selection.
Thanks to Coverity:
CID 1453380 (#2 of 2): Out-of-bounds access (OVERRUN)
6. overrun-call: Overrunning callee's array of size 4 by passing
argument 8 in call to CmdPowerOn.
src/ccid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit d8eec80534b8f849430b6f4363ae39a67c17642b
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Aug 28 14:11:15 2019 +0200
Identiv uTrust 3700/3701 F and uTrust 4701 are bogus
Increase the timeout used to detect the reader.
The same patch was already used for the SCM SCL 011 reader from the same
manufacturer.
src/ccid.c | 3 +++
src/ccid.h | 3 +++
2 files changed, 6 insertions(+)
commit 743e9a9daf4dd27128eb6be8b13562f0ea695fd5 (tag: ccid-1.4.31)
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Aug 10 11:49:32 2019 +0200
@ -9,7 +694,7 @@ Date: Sat Aug 10 11:49:32 2019 +0200
Makefile.am | 1 +
1 file changed, 1 insertion(+)
commit 680d7479c6b9eb02fabc657a727888c35e6fd31d (origin/master, origin/HEAD)
commit 680d7479c6b9eb02fabc657a727888c35e6fd31d
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Sat Aug 10 11:43:21 2019 +0200
@ -41,7 +726,7 @@ Date: Sat Aug 10 11:37:36 2019 +0200
README => README.md | 0
1 file changed, 0 insertions(+), 0 deletions(-)
commit d66f0fad276cf1210536c7534a2edd56e4f8350c (zotac/master)
commit d66f0fad276cf1210536c7534a2edd56e4f8350c
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed Jul 31 17:08:12 2019 +0200
@ -567,7 +1252,7 @@ Date: Mon Jul 16 20:06:00 2018 +0200
readers/Fujitsu_Smartcard_Reader_D323.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit 6021465a8330021bf4399ee2bd65e4d0bcd6f476 (github/master)
commit 6021465a8330021bf4399ee2bd65e4d0bcd6f476
Author: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Mon Jul 9 15:53:41 2018 +0200

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -139,8 +139,8 @@ am__recursive_targets = \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
$(LISP)config.h.in
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
config.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
@ -618,6 +618,10 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-zstd: distdir
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@ -660,6 +664,8 @@ distcheck: dist
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
*.tar.zst*) \
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
@ -839,18 +845,18 @@ uninstall-am:
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
dist-xz dist-zip distcheck distclean distclean-generic \
distclean-hdr distclean-libtool distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
dist-xz dist-zip dist-zstd distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile

View File

@ -6,8 +6,8 @@ Card Interface Devices) and ICCD (Integrated Circuit(s) Card Devices)
driver. See the USB CCID [1] and ICCD [2] specifications from the USB
working group.
* [1] http://www.usb.org/developers/docs/devclass_docs/DWG_Smart-Card_CCID_Rev110.pdf
* [2] http://www.usb.org/developers/docs/devclass_docs/DWG_Smart-Card_USB-ICC_ICCD_rev10.pdf
* [1] https://www.usb.org/sites/default/files/DWG_Smart-Card_CCID_Rev110.pdf
* [2] https://www.usb.org/sites/default/files/DWG_Smart-Card_USB-ICC_ICCD_rev10.pdf
Authors:
========
@ -117,6 +117,47 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
History:
========
1.4.32 - 22 April 2020, Ludovic Rousseau
- Add support of
- AF Care One (idProduct: 0xAFC0)
- AF Care One (idProduct: 0xAFC1)
- AF Care Two (idProduct: 0xAFC2)
- AF Care Two (idProduct: 0xAFC3)
- Access IS ATR210
- Access IS ATR220
- Cherry GmbH CHERRY SECURE BOARD 1.0
- Doctolib SR with idProduct: 0xAFD0
- Doctolib SR with idProduct: 0xAFD1
- Doctolib SR with idProduct: 0xAFD2
- Doctolib SR with idProduct: 0xAFD3
- F-Secure Foundry USB Armory Mk II
- Gemalto RF CR5400
- Ledger Nano X support
- Purism, SPC Librem Key
- SPECINFOSYSTEMS DIAMOND HSM
- SPECINFOSYSTEMS DIAMOND PLUS token
- SPECINFOSYSTEMS DIAMOND PRO token
- SpringCard E518 (idProduct: 0x6112)
- SpringCard E518 (idProduct: 0x611A)
- SpringCard H518 (idProduct: 0x6122)
- SpringCard H518 (idProduct: 0x612A)
- SpringCard Puck
- SpringCard Puck (dProduct: 0x613A)
- SpringCard SpringCore (idProduct: 0x6012)
- SpringCard SpringCore (idProduct: 0x601A)
- Sysking MII136C
- Add SCardGetAttrib(.., SCARD_ATTR_CHANNEL_ID, ..) for USB devices
- Increase the timeout used to detect the Identiv uTrust 3700/3701 F readers
- Fix PowerOn bug for ICCD type A & B devices
- Fix "Bus Error" on SPARC64 CPU and Solaris C compiler
- Cherry KC 1000 SC
- Add support of min & max PIN size
- Fix a bNumberMessage issue
- Add support of min & max PIN size for the Omnikey 3821
- Disable pinpad for Chicony HP Skylab USB Smartcard Keyboard
- Some minor improvements
1.4.31 - 10 August 2019, Ludovic Rousseau
- Add support of
- ACS ACR1252 Reader

View File

@ -66,6 +66,11 @@ SCARD_ATTR_MAXINPUT
SCARD_ATTR_VENDOR_IFD_SERIAL_NO
reader serial number (if available).
SCARD_ATTR_CHANNEL_ID
DWORD in the form 0xDDDDCCCC with:
DDDD equal to 0x0020 for USB devices
CCCC equal to bus number in the high byte and device address in the
low byte
Sample code
===========

54
aclocal.m4 vendored
View File

@ -1,6 +1,6 @@
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -296,7 +296,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -311,7 +311,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.16.1], [],
m4_if([$1], [1.16.2], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@ -327,12 +327,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.16.1])dnl
[AM_AUTOMAKE_VERSION([1.16.2])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Copyright (C) 2011-2018 Free Software Foundation, Inc.
# Copyright (C) 2011-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -394,7 +394,7 @@ AC_SUBST([AR])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -446,7 +446,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -477,7 +477,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -668,7 +668,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -707,7 +707,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
done
if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE="gmake" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).])
fi
@ -734,7 +736,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -931,7 +933,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -952,7 +954,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
# Copyright (C) 2003-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -971,7 +973,7 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Copyright (C) 1998-2018 Free Software Foundation, Inc.
# Copyright (C) 1998-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -992,7 +994,7 @@ fi])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1027,7 +1029,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1070,7 +1072,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1109,7 +1111,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1138,7 +1140,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1185,7 +1187,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1204,7 +1206,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1285,7 +1287,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1345,7 +1347,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1373,7 +1375,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
# Copyright (C) 2006-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1392,7 +1394,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2018 Free Software Foundation, Inc.
# Copyright (C) 2004-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

17
ar-lib
View File

@ -2,9 +2,9 @@
# Wrapper for Microsoft lib.exe
me=ar-lib
scriptversion=2012-03-01.08; # UTC
scriptversion=2019-07-04.01; # UTC
# Copyright (C) 2010-2018 Free Software Foundation, Inc.
# Copyright (C) 2010-2020 Free Software Foundation, Inc.
# Written by Peter Rosin <peda@lysator.liu.se>.
#
# This program is free software; you can redistribute it and/or modify
@ -53,7 +53,7 @@ func_file_conv ()
MINGW*)
file_conv=mingw
;;
CYGWIN*)
CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
@ -65,7 +65,7 @@ func_file_conv ()
mingw)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin)
cygwin | msys)
file=`cygpath -m "$file" || echo "$file"`
;;
wine)
@ -224,10 +224,11 @@ elif test -n "$extract"; then
esac
done
else
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
do
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
done
$AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
| while read member
do
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
done
fi
elif test -n "$quick$replace"; then

View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@ -53,7 +53,7 @@ func_file_conv ()
MINGW*)
file_conv=mingw
;;
CYGWIN*)
CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
@ -67,7 +67,7 @@ func_file_conv ()
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)

36
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for ccid 1.4.31.
# Generated by GNU Autoconf 2.69 for ccid 1.4.32.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ccid'
PACKAGE_TARNAME='ccid'
PACKAGE_VERSION='1.4.31'
PACKAGE_STRING='ccid 1.4.31'
PACKAGE_VERSION='1.4.32'
PACKAGE_STRING='ccid 1.4.32'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1378,7 +1378,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures ccid 1.4.31 to adapt to many kinds of systems.
\`configure' configures ccid 1.4.32 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1449,7 +1449,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ccid 1.4.31:";;
short | recursive ) echo "Configuration of ccid 1.4.32:";;
esac
cat <<\_ACEOF
@ -1593,7 +1593,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ccid configure 1.4.31
ccid configure 1.4.32
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -2012,7 +2012,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ccid $as_me 1.4.31, which was
It was created by ccid $as_me 1.4.32, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -2876,7 +2876,7 @@ fi
# Define the identity of the package.
PACKAGE='ccid'
VERSION='1.4.31'
VERSION='1.4.32'
cat >>confdefs.h <<_ACEOF
@ -6634,7 +6634,7 @@ esac
fi
: ${AR=ar}
: ${AR_FLAGS=cru}
: ${AR_FLAGS=cr}
@ -8355,8 +8355,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
echo "$AR cr libconftest.a conftest.o" >&5
$AR cr libconftest.a conftest.o 2>&5
echo "$RANLIB libconftest.a" >&5
$RANLIB libconftest.a 2>&5
cat > conftest.c << _LT_EOF
@ -9217,6 +9217,12 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-static'
;;
# flang / f18. f95 an alias for gfortran or flang on Debian
flang* | f18* | f95*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-fPIC'
lt_prog_compiler_static='-static'
;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)
@ -14708,7 +14714,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ccid $as_me 1.4.31, which was
This file was extended by ccid $as_me 1.4.32, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -14774,7 +14780,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
ccid config.status 1.4.31
ccid config.status 1.4.32
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@ -15873,7 +15879,9 @@ $as_echo X/"$am_mf" |
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE=\"gmake\" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See \`config.log' for more details" "$LINENO" 5; }

View File

@ -4,10 +4,10 @@
# Require autoconf 2.61
AC_PREREQ([2.69])
AC_INIT([ccid],[1.4.31])
AC_INIT([ccid],[1.4.32])
AC_CONFIG_SRCDIR(src/ifdhandler.c)
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE(1.8 dist-bzip2 no-dist-gzip subdir-objects)
AM_INIT_AUTOMAKE(1.8 dist-bzip2 no-dist-gzip subdir-objects foreign)
AC_CONFIG_MACRO_DIR([m4])
# silent build by default

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# 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

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View File

@ -1,6 +1,6 @@
/*
scardcontrol.c: sample code to use/test SCardControl() API
Copyright (C) 2004-2011 Ludovic Rousseau
Copyright (C) 2004-2019 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
@ -72,7 +72,7 @@ else \
#define PCSC_ERROR_CONT(rv, text) \
if (rv != SCARD_S_SUCCESS) \
printf(text ": " BLUE "%s (0x%"LF"X)\n" NORMAL, pcsc_stringify_error(rv), rv); \
printf(text ": " RED "%s (0x%"LF"X)\n" NORMAL, pcsc_stringify_error(rv), rv); \
else \
printf(text ": " BLUE "OK\n\n" NORMAL);
@ -173,10 +173,14 @@ static void parse_properties(unsigned char *bRecvBuffer, int length)
} /* parse_properties */
static const char *pinpad_return_codes(unsigned char bRecvBuffer[])
static const char *pinpad_return_codes(int length,
unsigned char bRecvBuffer[])
{
const char * ret = "UNKNOWN";
if (length < 2)
return "";
if ((0x90 == bRecvBuffer[0]) && (0x00 == bRecvBuffer[1]))
ret = "Success";
@ -240,6 +244,7 @@ int main(int argc, char *argv[])
#ifdef MODIFY_PIN
PIN_MODIFY_STRUCTURE *pin_modify;
#endif
char error;
int PIN_min_size = 4;
int PIN_max_size = 8;
@ -524,6 +529,8 @@ int main(int argc, char *argv[])
PCSC_ERROR_CONT(rv, "SCardControl")
}
#else
(void)ccid_esc_command;
#endif
if (0 == verify_ioctl)
@ -575,7 +582,7 @@ int main(int argc, char *argv[])
}
/* APDU select applet */
printf("Select applet: ");
printf("Select applet:");
send_length = 11;
memcpy(bSendBuffer, "\x00\xA4\x04\x00\x06\xA0\x00\x00\x00\x18\xFF",
send_length);
@ -610,7 +617,7 @@ int main(int argc, char *argv[])
pin_verify -> wPINMaxExtraDigit = (PIN_min_size << 8) + PIN_max_size;
pin_verify -> bEntryValidationCondition = bEntryValidationCondition;
pin_verify -> bNumberMessage = 0x01;
pin_verify -> wLangId = 0x0904;
pin_verify -> wLangId = 0x0409; /* United States */
pin_verify -> bMsgIndex = 0x00;
pin_verify -> bTeoPrologue[0] = 0x00;
pin_verify -> bTeoPrologue[1] = 0x00;
@ -673,14 +680,20 @@ int main(int argc, char *argv[])
printf("\n");
}
printf(" card response:");
error = FALSE;
if (length != 2 || bRecvBuffer[0] != 0x90 || bRecvBuffer[1] != 0x00)
error = TRUE;
printf(error ? RED : GREEN);
printf(" card response [%"LF"d bytes]:", length);
for (i=0; i<length; i++)
printf(" %02X", bRecvBuffer[i]);
printf(": %s\n", pinpad_return_codes(bRecvBuffer));
printf(": %s", pinpad_return_codes(length, bRecvBuffer));
printf(NORMAL "\n");
PCSC_ERROR_CONT(rv, "SCardControl")
/* verify PIN dump */
printf("\nverify PIN dump: ");
printf("\nverify PIN dump:");
send_length = 5;
memcpy(bSendBuffer, "\x00\x40\x00\x00\xFF",
send_length);
@ -698,7 +711,7 @@ int main(int argc, char *argv[])
if ((2 == length) && (0x6C == bRecvBuffer[0]))
{
printf("\nverify PIN dump: ");
printf("\nverify PIN dump:");
send_length = 5;
memcpy(bSendBuffer, "\x00\x40\x00\x00\xFF",
send_length);
@ -754,7 +767,7 @@ int main(int argc, char *argv[])
/* b1 set = current PIN entry requested */
pin_modify -> bEntryValidationCondition = bEntryValidationCondition;
pin_modify -> bNumberMessage = 0x03; /* see table above */
pin_modify -> wLangId = 0x0904;
pin_modify -> wLangId = 0x0409; /* United States */
pin_modify -> bMsgIndex1 = 0x00;
pin_modify -> bMsgIndex2 = 0x01;
pin_modify -> bMsgIndex3 = 0x02;
@ -830,14 +843,20 @@ int main(int argc, char *argv[])
}
}
printf(" card response:");
error = FALSE;
if (length != 2 || bRecvBuffer[0] != 0x90 || bRecvBuffer[1] != 0x00)
error = TRUE;
printf(error ? RED : GREEN);
printf(" card response [%d bytes]:", length);
for (i=0; i<length; i++)
printf(" %02X", bRecvBuffer[i]);
printf("\n");
printf(": %s", pinpad_return_codes(length, bRecvBuffer));
printf(NORMAL "\n");
PCSC_ERROR_CONT(rv, "SCardControl")
/* modify PIN dump */
printf("\nmodify PIN dump: ");
printf("\nmodify PIN dump:");
send_length = 5;
memcpy(bSendBuffer, "\x00\x40\x00\x00\xFF",
send_length);
@ -855,7 +874,7 @@ int main(int argc, char *argv[])
if ((2 == length) && (0x6C == bRecvBuffer[0]))
{
printf("\nverify PIN dump: ");
printf("\nverify PIN dump:");
send_length = 5;
memcpy(bSendBuffer, "\x00\x40\x00\x00\xFF",
send_length);

View File

@ -451,7 +451,18 @@ do
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
(umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#

View File

@ -31,7 +31,7 @@
PROGRAM=libtool
PACKAGE=libtool
VERSION="2.4.6 Debian-2.4.6-9"
VERSION="2.4.6 Debian-2.4.6-14"
package_revision=2.4.6
@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
# putting '$debug_cmd' at the start of all your functions, you can get
# bash to show function call trace with:
#
# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
debug_cmd=${debug_cmd-":"}
exit_cmd=:
@ -2141,7 +2141,7 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
version: $progname $scriptversion Debian-2.4.6-9
version: $progname $scriptversion Debian-2.4.6-14
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
@ -7368,10 +7368,12 @@ func_mode_link ()
# -stdlib=* select c++ std lib with clang
# -fsanitize=* Clang/GCC memory and address sanitizer
# -fuse-ld=* Linker select flags for GCC
# -static-* direct GCC to link specific libraries statically
# -fcilkplus Cilk Plus language extension features for C/C++
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-specs=*|-fsanitize=*|-fuse-ld=*)
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"

12
m4/libtool.m4 vendored
View File

@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
$AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
$AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
@ -1492,7 +1492,7 @@ need_locks=$enable_libtool_lock
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
: ${AR_FLAGS=cru}
: ${AR_FLAGS=cr}
_LT_DECL([], [AR], [1], [The archiver])
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
@ -4704,6 +4704,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
# flang / f18. f95 an alias for gfortran or flang on Debian
flang* | f18* | f95*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)

View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View File

@ -1,6 +1,6 @@
#
# List of readers supported by the CCID driver
# Generated: 2019-07-31
# Generated: 2020-03-31
#
# DO NOT EDIT BY HAND
@ -125,6 +125,8 @@
0x0DB5:0x0138:Access IS ePassport Reader
0x0DB5:0x0160:Access IS NFC Smart Module
0x0DB5:0x0164:Access IS NFC Smart Module
0x0DB5:0x0170:Access IS ATR210
0x0DB5:0x0180:Access IS ATR220
# ACS
0x072F:0x1204:ACS ACR101 ICC Reader
@ -140,6 +142,12 @@
0x072F:0xB100:ACS ACR39U ICC Reader
0x072F:0xB106:ACS CryptoMate (T2)
# AF Care
0x1C34:0xAFC0:AF Care One
0x1C34:0xAFC1:AF Care One
0x1C34:0xAFC2:AF Care Two
0x1C34:0xAFC3:AF Care Two
# AK910
0x2021:0x0001:AK910 CKey
0x2021:0x0011:AK910 CKey
@ -279,6 +287,7 @@
0x046A:0x005B:Cherry GmbH SmartBoard XX1X
0x046A:0x0070:Cherry GmbH SmartTerminal XX1X
0x046A:0x0072:Cherry GmbH SmartTerminal ST-1275
0x046A:0x01A2:Cherry GmbH CHERRY SECURE BOARD 1.0
# Chicony
0x04F2:0x0967:Chicony USB Smart Card Keyboard
@ -293,6 +302,12 @@
# DC.Ltd
0x257B:0xC305:DC.Ltd DC4 5CCID READER
# Doctolib
0x1C34:0xAFD0:Doctolib SR
0x1C34:0xAFD1:Doctolib SR
0x1C34:0xAFD2:Doctolib SR
0x1C34:0xAFD3:Doctolib SR
# DUALi
0x1DB2:0x0801:DUALi DE-620 Combi
0x1DB2:0x088B:DUALi DRAGON NFC READER
@ -307,6 +322,9 @@
# ESMART
0x2CE4:0x7479:ESMART Token GOST
# F-Secure Foundry
0x1209:0x2702:F-Secure Foundry USB Armory Mk II
# FEITIAN
0x096E:0x0619:FEITIAN iR301
0x096E:0x061A:FEITIAN bR301
@ -351,6 +369,7 @@
0x08E6:0x3440:GEMALTO CT1100
# Gemalto
0x0898:0x0101:Gemalto RF CR5400
0x08E6:0x2202:Gemalto Gem e-Seal Pro USB Token
0x08E6:0x34C1:Gemalto Ezio Shield Secure Channel
0x08E6:0x34C2:Gemalto Ezio Shield
@ -513,6 +532,7 @@
# Ledger
0x2C97:0x0001:Ledger Nano S
0x2C97:0x0004:Ledger Nano X
# Lenovo
0x17EF:0x6007:Lenovo Lenovo USB Smartcard Keyboard
@ -602,6 +622,9 @@
# Planeta
0x21AB:0x0010:Planeta RC700-NFC CCID
# Purism, SPC
0x316D:0x4C4B:Purism, SPC Librem Key
# Raritan
0x14DD:0x1006:Raritan D2CIM-DVUSB VM/CCID
@ -661,8 +684,19 @@
# SPECINFOSYSTEMS
0x316E:0x0001:SPECINFOSYSTEMS DIAMOND token
0x316E:0x0002:SPECINFOSYSTEMS DIAMOND PRO token
0x316E:0x0003:SPECINFOSYSTEMS DIAMOND PLUS token
0x316E:0x0010:SPECINFOSYSTEMS DIAMOND HSM
# SpringCard
0x1C34:0x6012:SpringCard SpringCore
0x1C34:0x601A:SpringCard SpringCore
0x1C34:0x6112:SpringCard E518
0x1C34:0x611A:SpringCard E518
0x1C34:0x6122:SpringCard H518
0x1C34:0x612A:SpringCard H518
0x1C34:0x6132:SpringCard Puck
0x1C34:0x613A:SpringCard Puck
0x1C34:0x7113:SpringCard CrazyWriter
0x1C34:0x7121:SpringCard CSB6 Basic
0x1C34:0x7123:SpringCard CSB6 Secure
@ -683,6 +717,9 @@
# SYNNIX
0x1206:0x2105:SYNNIX STD200
# Sysking
0x0E6A:0x5083:Sysking MII136C
# Teridian Semiconductors
0x1862:0x0000:Teridian Semiconductors TSC12xxFV.09
@ -906,6 +943,7 @@
#0x076B:0xA022:XIRING Teo (Teo.txt)
#0x08E6:0x3437:Gemalto PC Twin Reader (GemPCTwin.txt)
#0x08E6:0x3437:Gemalto PC Twin Reader (serial) (GemPCTwinSerial.txt)
#0x08E6:0x3437:Gemalto IDBridge CT30 (Gemalto_IDBridge_CT30.txt)
#0x08E6:0x3437:Gemalto K50 (Gemalto_K50.txt)

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View File

@ -96,6 +96,9 @@ int ccid_open_hack_pre(unsigned int reader_index)
break;
case SCM_SCL011:
case IDENTIV_uTrust3700F:
case IDENTIV_uTrust3701F:
case IDENTIV_uTrust4701F:
/* The SCM SCL011 reader needs 350 ms to answer */
ccid_descriptor->readTimeout = DEFAULT_COM_READ_TIMEOUT * 4;
break;
@ -119,7 +122,7 @@ int ccid_open_hack_pre(unsigned int reader_index)
DEBUG_COMM("ICCD type A");
(void)CmdPowerOff(reader_index);
(void)CmdPowerOn(reader_index, &n, tmp, CCID_CLASS_AUTO_VOLTAGE);
(void)CmdPowerOn(reader_index, &n, tmp, VOLTAGE_AUTO);
(void)CmdPowerOff(reader_index);
}
@ -139,7 +142,7 @@ int ccid_open_hack_pre(unsigned int reader_index)
}
(void)CmdPowerOff(reader_index);
(void)CmdPowerOn(reader_index, &n, tmp, CCID_CLASS_AUTO_VOLTAGE);
(void)CmdPowerOn(reader_index, &n, tmp, VOLTAGE_AUTO);
(void)CmdPowerOff(reader_index);
}
@ -478,6 +481,7 @@ int ccid_open_hack_post(unsigned int reader_index)
case HPSMARTCARDKEYBOARD:
case HP_CCIDSMARTCARDKEYBOARD:
case FUJITSUSMARTKEYB:
case CHICONYHPSKYLABKEYBOARD:
/* the Secure Pin Entry is bogus so disable it
* https://web.archive.org/web/20120320001756/http://martinpaljak.net/2011/03/19/insecure-hp-usb-smart-card-keyboard/
*

View File

@ -214,6 +214,7 @@ typedef struct
#define VEGAALPHA 0x09820008
#define HPSMARTCARDKEYBOARD 0x03F01024
#define HP_CCIDSMARTCARDKEYBOARD 0x03F00036
#define CHICONYHPSKYLABKEYBOARD 0x04F21469
#define KOBIL_IDTOKEN 0x0D46301D
#define FUJITSUSMARTKEYB 0x0BF81017
#define FEITIANR502DUAL 0x096E060D
@ -225,9 +226,13 @@ typedef struct
#define HID_AVIATOR 0x076B3A21
#define HID_OMNIKEY_5422 0x076B5422
#define HID_OMNIKEY_3X21 0x076B3031 /* OMNIKEY 3121 or 3021 or 1021 */
#define HID_OMNIKEY_3821 0x076B3821 /* OMNIKEY 3821 */
#define HID_OMNIKEY_6121 0x076B6632 /* OMNIKEY 6121 */
#define CHERRY_XX44 0x046A00A7 /* Cherry Smart Terminal xx44 */
#define FUJITSU_D323 0x0BF81024 /* Fujitsu Smartcard Reader D323 */
#define IDENTIV_uTrust3700F 0x04E65790
#define IDENTIV_uTrust3701F 0x04E65791
#define IDENTIV_uTrust4701F 0x04E65724
#define VENDOR_GEMALTO 0x08E6
#define GET_VENDOR(readerID) ((readerID >> 16) & 0xFFFF)

View File

@ -1099,12 +1099,33 @@ static int get_end_points(struct libusb_config_descriptor *desc,
} /* get_end_points */
/*****************************************************************************
*
* get_ccid_usb_bus_number
*
****************************************************************************/
uint8_t get_ccid_usb_bus_number(int reader_index)
{
return usbDevice[reader_index].bus_number;
}
/*****************************************************************************
*
* get_ccid_usb_device_address
*
****************************************************************************/
uint8_t get_ccid_usb_device_address(int reader_index)
{
return usbDevice[reader_index].device_address;
}
/*****************************************************************************
*
* get_ccid_usb_interface
*
****************************************************************************/
/*@null@*/ EXTERNAL const struct libusb_interface * get_ccid_usb_interface(
/*@null@*/ const struct libusb_interface * get_ccid_usb_interface(
struct libusb_config_descriptor *desc, int *num)
{
const struct libusb_interface *usb_interface = NULL;

View File

@ -37,6 +37,9 @@ status_t CloseUSB(unsigned int reader_index);
const unsigned char *get_ccid_device_descriptor(const struct libusb_interface *usb_interface);
uint8_t get_ccid_usb_bus_number(int reader_index);
uint8_t get_ccid_usb_device_address(int reader_index);
int ControlUSB(int reader_index, int requesttype, int request, int value,
unsigned char *bytes, unsigned int size);

View File

@ -59,12 +59,6 @@
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
#ifndef BSWAP_16
#define BSWAP_8(x) ((x) & 0xff)
#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8))
#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16))
#endif
#define CHECK_STATUS(res) \
if (STATUS_NO_SUCH_DEVICE == res) \
return IFD_NO_SUCH_DEVICE; \
@ -320,6 +314,8 @@ RESPONSECODE SecurePINVerify(unsigned int reader_index,
RESPONSECODE ret;
status_t res;
uint32_t ulDataLength;
pvs = (PIN_VERIFY_STRUCTURE *)TxBuffer;
cmd[0] = 0x69; /* Secure */
cmd[5] = ccid_descriptor->bCurrentSlotIndex; /* slot number */
@ -337,15 +333,16 @@ RESPONSECODE SecurePINVerify(unsigned int reader_index,
/* On little endian machines we are all set. */
/* If on big endian machine and caller is using host byte order */
if ((pvs->ulDataLength + 19 == TxLength) &&
(bei2i((unsigned char*)(&pvs->ulDataLength)) == pvs->ulDataLength))
ulDataLength = get_U32(&pvs->ulDataLength);
if ((ulDataLength + 19 == TxLength) &&
(bei2i((unsigned char*)(&pvs->ulDataLength)) == ulDataLength))
{
DEBUG_INFO1("Reversing order from big to little endian");
/* If ulDataLength is big endian, assume others are too */
/* reverse the byte order for 3 fields */
pvs->wPINMaxExtraDigit = BSWAP_16(pvs->wPINMaxExtraDigit);
pvs->wLangId = BSWAP_16(pvs->wLangId);
pvs->ulDataLength = BSWAP_32(pvs->ulDataLength);
p_bswap_16(&pvs->wPINMaxExtraDigit);
p_bswap_16(&pvs->wLangId);
p_bswap_32(&pvs->ulDataLength);
}
/* At this point we now have the above 3 variables in little endian */
@ -653,6 +650,7 @@ RESPONSECODE SecurePINModify(unsigned int reader_index,
int bNumberMessage = 0; /* for GemPC Pinpad */
int gemalto_modify_pin_bug;
#endif
uint32_t ulDataLength;
pms = (PIN_MODIFY_STRUCTURE *)TxBuffer;
cmd[0] = 0x69; /* Secure */
@ -671,15 +669,16 @@ RESPONSECODE SecurePINModify(unsigned int reader_index,
/* On little endian machines we are all set. */
/* If on big endian machine and caller is using host byte order */
if ((pms->ulDataLength + 24 == TxLength) &&
(bei2i((unsigned char*)(&pms->ulDataLength)) == pms->ulDataLength))
ulDataLength = get_U32(&pms->ulDataLength);
if ((ulDataLength + 24 == TxLength) &&
(bei2i((unsigned char*)(&pms->ulDataLength)) == ulDataLength))
{
DEBUG_INFO1("Reversing order from big to little endian");
/* If ulDataLength is big endian, assume others are too */
/* reverse the byte order for 3 fields */
pms->wPINMaxExtraDigit = BSWAP_16(pms->wPINMaxExtraDigit);
pms->wLangId = BSWAP_16(pms->wLangId);
pms->ulDataLength = BSWAP_32(pms->ulDataLength);
p_bswap_16(&pms->wPINMaxExtraDigit);
p_bswap_16(&pms->wLangId);
p_bswap_32(&pms->ulDataLength);
}
/* At this point we now have the above 3 variables in little endian */
@ -761,6 +760,18 @@ RESPONSECODE SecurePINModify(unsigned int reader_index,
TxBuffer[11] = 0x03; /* 3 messages */
}
}
/* Bug workaround for Cherry KC 1000 SC */
if (CHERRY_KC1000SC == ccid_descriptor->readerID)
{
/* The reader rejects bNumberMessage 0x00 in a PIN modify
* command. Change it to 0xff which is accepted. */
if (0x00 == TxBuffer[11])
{
DEBUG_INFO1("Correct bNumberMessage for Cherry KC 1000 SC (was 0)");
TxBuffer[11] = 0xff;
}
}
#endif
/* T=1 Protocol Management for a TPDU reader */

View File

@ -612,6 +612,19 @@ EXTERNAL RESPONSECODE IFDHGetCapabilities(DWORD Lun, DWORD Tag,
}
break;
#if !defined(TWIN_SERIAL)
case SCARD_ATTR_CHANNEL_ID:
{
*Length = sizeof(uint32_t);
if (Value) {
uint32_t bus = get_ccid_usb_bus_number(reader_index);
uint32_t addr = get_ccid_usb_device_address(reader_index);
*(uint32_t *)Value = ((uint32_t)0x0020 << 16) | bus << 8 | addr;
}
}
break;
#endif
default:
return_value = IFD_ERROR_TAG;
}
@ -1476,7 +1489,8 @@ EXTERNAL RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode,
{
pcsc_tlv -> tag = FEATURE_VERIFY_PIN_DIRECT;
pcsc_tlv -> length = 0x04; /* always 0x04 */
pcsc_tlv -> value = htonl(IOCTL_FEATURE_VERIFY_PIN_DIRECT);
set_U32(&pcsc_tlv -> value,
htonl(IOCTL_FEATURE_VERIFY_PIN_DIRECT));
pcsc_tlv++;
iBytesReturned += sizeof(PCSC_TLV_STRUCTURE);
@ -1486,7 +1500,8 @@ EXTERNAL RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode,
{
pcsc_tlv -> tag = FEATURE_MODIFY_PIN_DIRECT;
pcsc_tlv -> length = 0x04; /* always 0x04 */
pcsc_tlv -> value = htonl(IOCTL_FEATURE_MODIFY_PIN_DIRECT);
set_U32(&pcsc_tlv -> value,
htonl(IOCTL_FEATURE_MODIFY_PIN_DIRECT));
pcsc_tlv++;
iBytesReturned += sizeof(PCSC_TLV_STRUCTURE);
@ -1497,7 +1512,8 @@ EXTERNAL RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode,
{
pcsc_tlv -> tag = FEATURE_IFD_PIN_PROPERTIES;
pcsc_tlv -> length = 0x04; /* always 0x04 */
pcsc_tlv -> value = htonl(IOCTL_FEATURE_IFD_PIN_PROPERTIES);
set_U32(&pcsc_tlv -> value,
htonl(IOCTL_FEATURE_IFD_PIN_PROPERTIES));
pcsc_tlv++;
iBytesReturned += sizeof(PCSC_TLV_STRUCTURE);
@ -1508,7 +1524,8 @@ EXTERNAL RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode,
{
pcsc_tlv -> tag = FEATURE_MCT_READER_DIRECT;
pcsc_tlv -> length = 0x04; /* always 0x04 */
pcsc_tlv -> value = htonl(IOCTL_FEATURE_MCT_READER_DIRECT);
set_U32(&pcsc_tlv -> value,
htonl(IOCTL_FEATURE_MCT_READER_DIRECT));
pcsc_tlv++;
iBytesReturned += sizeof(PCSC_TLV_STRUCTURE);
@ -1516,7 +1533,8 @@ EXTERNAL RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode,
pcsc_tlv -> tag = FEATURE_GET_TLV_PROPERTIES;
pcsc_tlv -> length = 0x04; /* always 0x04 */
pcsc_tlv -> value = htonl(IOCTL_FEATURE_GET_TLV_PROPERTIES);
set_U32(&pcsc_tlv -> value,
htonl(IOCTL_FEATURE_GET_TLV_PROPERTIES));
pcsc_tlv++;
iBytesReturned += sizeof(PCSC_TLV_STRUCTURE);
@ -1525,7 +1543,8 @@ EXTERNAL RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode,
{
pcsc_tlv -> tag = FEATURE_CCID_ESC_COMMAND;
pcsc_tlv -> length = 0x04; /* always 0x04 */
pcsc_tlv -> value = htonl(IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE);
set_U32(&pcsc_tlv -> value,
htonl(IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE));
pcsc_tlv++;
iBytesReturned += sizeof(PCSC_TLV_STRUCTURE);
@ -1545,7 +1564,7 @@ EXTERNAL RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode,
return IFD_ERROR_INSUFFICIENT_BUFFER;
/* Only give the LCD size for now */
caps -> wLcdLayout = ccid_descriptor -> wLcdLayout;
set_U16(&caps -> wLcdLayout, ccid_descriptor -> wLcdLayout);
/* Hardcoded special reader cases */
switch (ccid_descriptor->readerID)
@ -1668,6 +1687,34 @@ EXTERNAL RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode,
RxBuffer[p++] = 0x02; /* validation key pressed */
}
/* Cherry KC 1000 SC */
if (CHERRY_KC1000SC == ccid_descriptor -> readerID)
{
/* bMinPINSize */
RxBuffer[p++] = PCSCv2_PART10_PROPERTY_bMinPINSize;
RxBuffer[p++] = 1; /* length */
RxBuffer[p++] = 0; /* min PIN size */
/* bMaxPINSize */
RxBuffer[p++] = PCSCv2_PART10_PROPERTY_bMaxPINSize;
RxBuffer[p++] = 1; /* length */
RxBuffer[p++] = 32; /* max PIN size */
}
/* Omnikey 3821 */
if (HID_OMNIKEY_3821 == ccid_descriptor -> readerID)
{
/* bMinPINSize */
RxBuffer[p++] = PCSCv2_PART10_PROPERTY_bMinPINSize;
RxBuffer[p++] = 1; /* length */
RxBuffer[p++] = 1; /* min PIN size */
/* bMaxPINSize */
RxBuffer[p++] = PCSCv2_PART10_PROPERTY_bMaxPINSize;
RxBuffer[p++] = 1; /* length */
RxBuffer[p++] = 31; /* max PIN size */
}
/* Gemalto readers providing firmware features */
if (ccid_descriptor -> gemalto_firmware_features)
{

View File

@ -17,6 +17,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <string.h>
#include <pcsclite.h>
#include <config.h>
@ -79,3 +80,62 @@ void ReleaseReaderIndex(const int index)
ReaderIndex[index] = -1;
} /* ReleaseReaderIndex */
/* Read a non aligned 16-bit integer */
uint16_t get_U16(void *buf)
{
uint16_t value;
memcpy(&value, buf, sizeof value);
return value;
}
/* Read a non aligned 32-bit integer */
uint32_t get_U32(void *buf)
{
uint32_t value;
memcpy(&value, buf, sizeof value);
return value;
}
/* Write a non aligned 16-bit integer */
void set_U16(void *buf, uint16_t value)
{
memcpy(buf, &value, sizeof value);
}
/* Write a non aligned 32-bit integer */
void set_U32(void *buf, uint32_t value)
{
memcpy(buf, &value, sizeof value);
}
/* swap a 16-bits integer in memory */
/* "AB" -> "BA" */
void p_bswap_16(void *ptr)
{
uint8_t *array, tmp;
array = ptr;
tmp = array[0];
array[0] = array[1];
array[1] = tmp;
}
/* swap a 32-bits integer in memory */
/* "ABCD" -> "DCBA" */
void p_bswap_32(void *ptr)
{
uint8_t *array, tmp;
array = ptr;
tmp = array[0];
array[0] = array[3];
array[3] = tmp;
tmp = array[1];
array[1] = array[2];
array[2] = tmp;
}

View File

@ -27,3 +27,9 @@ int GetNewReaderIndex(const int Lun);
int LunToReaderIndex(int Lun);
void ReleaseReaderIndex(const int idx);
uint16_t get_U16(void *);
uint32_t get_U32(void *);
void set_U16(void *, uint16_t);
void set_U32(void *, uint32_t);
void p_bswap_16(void *ptr);
void p_bswap_32(void *ptr);

2
ylwrap
View File

@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# Written by Tom Tromey <tromey@cygnus.com>.
#