From 93dc650f02aa9aedc1c5e4c9bb0816d4f971210d Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Wed, 21 Feb 2018 09:52:40 +0100 Subject: [PATCH] New upstream version 1.4.29 --- README | 17 +++++++ configure | 20 ++++----- configure.ac | 2 +- readers/supported_readers.txt | 17 ++++++- src/ccid.c | 2 + src/ccid.h | 1 + src/ifdhandler.c | 83 +---------------------------------- 7 files changed, 48 insertions(+), 94 deletions(-) diff --git a/README b/README index c94a563..fa48bb8 100644 --- a/README +++ b/README @@ -118,6 +118,23 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. History: ======== +1.4.29 - 21 February 2018, Ludovic Rousseau + - Add support of + . Access IS NFC Smart Module (With idProduct 0x0164) + . Bit4id Digital-DNA Key + . Bit4id Digital-DNA Key BT + . Bluink Ltd. Bluink CCID + . Chicony HP Skylab USB Smartcard Keyboard + . HID Global OMNIKEY 5023 Smart Card Reader + . HID Global OMNIKEY 5027CK CCID CONFIG IF + . KeyXentic Inc. KX906 Smart Card Reader + . Spyrus Inc Rosetta USB + . Spyrus Inc WorkSafe Pro + . Watchdata USB Key (idProduct: 0x0418) + - The C3PO LTC31 v2 wrongly declares PIN support + - Remove extra EGT patch because if has bad side effects + + 1.4.28 - 11 October 2017, Ludovic Rousseau - Add support of . Athena IDProtect Flash diff --git a/configure b/configure index 9f0818e..21bb336 100755 --- a/configure +++ b/configure @@ -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.28. +# Generated by GNU Autoconf 2.69 for ccid 1.4.29. # # # 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.28' -PACKAGE_STRING='ccid 1.4.28' +PACKAGE_VERSION='1.4.29' +PACKAGE_STRING='ccid 1.4.29' 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.28 to adapt to many kinds of systems. +\`configure' configures ccid 1.4.29 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.28:";; + short | recursive ) echo "Configuration of ccid 1.4.29:";; 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.28 +ccid configure 1.4.29 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.28, which was +It was created by ccid $as_me 1.4.29, 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.28' + VERSION='1.4.29' cat >>confdefs.h <<_ACEOF @@ -14711,7 +14711,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.28, which was +This file was extended by ccid $as_me 1.4.29, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14777,7 +14777,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.28 +ccid config.status 1.4.29 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 2da3997..695e1fd 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ # Require autoconf 2.61 AC_PREREQ([2.69]) -AC_INIT([ccid],[1.4.28]) +AC_INIT([ccid],[1.4.29]) AC_CONFIG_SRCDIR(src/ifdhandler.c) AC_CONFIG_AUX_DIR([.]) AM_INIT_AUTOMAKE(1.8 dist-bzip2 no-dist-gzip subdir-objects) diff --git a/readers/supported_readers.txt b/readers/supported_readers.txt index fac4032..d2ac461 100644 --- a/readers/supported_readers.txt +++ b/readers/supported_readers.txt @@ -1,6 +1,6 @@ # # List of readers supported by the CCID driver -# Generated: 2017-10-02 +# Generated: 2018-02-20 # # DO NOT EDIT BY HAND @@ -124,6 +124,7 @@ # Access IS 0x0DB5:0x0138:Access IS ePassport Reader 0x0DB5:0x0160:Access IS NFC Smart Module +0x0DB5:0x0164:Access IS NFC Smart Module # ACS 0x072F:0x1204:ACS ACR101 ICC Reader @@ -210,8 +211,13 @@ 0x25DD:0x2321:Bit4id CKey4 0x25DD:0x2341:Bit4id tokenME FIPS v3 0x25DD:0x2351:Bit4id Digital DNA Key +0x25DD:0x2361:Bit4id Digital-DNA Key BT +0x25DD:0x2362:Bit4id Digital-DNA Key 0x25DD:0x3111:Bit4id miniLector +# Bluink Ltd. +0x2ABE:0x1003:Bluink Ltd. Bluink CCID + # BLUTRONICS 0x1B0E:0x1079:BLUTRONICS BLUDRIVE II CCID @@ -256,6 +262,7 @@ 0x04F2:0x0967:Chicony USB Smart Card Keyboard 0x03F0:0x114A:Chicony HP USB Smartcard CCID Keyboard KR 0x03F0:0x124A:Chicony HP USB Smartcard CCID Keyboard JP +0x04F2:0x1469:Chicony HP Skylab USB Smartcard Keyboard # COVADIS 0x0982:0x0008:COVADIS VEGA-ALPHA @@ -366,10 +373,12 @@ # HID Global 0x076B:0x3031:HID Global OMNIKEY 3x21 Smart Card Reader 0x076B:0x5022:HID Global OMNIKEY 5022 Smart Card Reader +0x076B:0x5023:HID Global OMNIKEY 5023 Smart Card Reader 0x076B:0x5400:HID Global veriCLASS Reader 0x076B:0x5412:HID Global OMNIKEY 5122 Smartcard Reader 0x076B:0x5422:HID Global OMNIKEY 5422 Smartcard Reader 0x076B:0x5432:HID Global OMNIKEY 5122 Dual +0x076B:0x5A27:HID Global OMNIKEY 5027CK CCID CONFIG IF 0x076B:0x6632:HID Global OMNIKEY 6121 Smart Card Reader # HID OMNIKEY @@ -445,6 +454,9 @@ # Kapsch TrafficCom 0x28B9:0x0002:Kapsch TrafficCom USB SAM reader +# KeyXentic Inc. +0x2F76:0x0906:KeyXentic Inc. KX906 Smart Card Reader + # Kingtrust 0x0483:0x0007:Kingtrust Multi-Reader @@ -619,6 +631,8 @@ 0x1C34:0xA1A1:SpringCard H512 Series # Spyrus Inc +0x08DF:0x0004:Spyrus Inc Rosetta USB +0x08DF:0x3115:Spyrus Inc WorkSafe Pro 0x08DF:0x3201:Spyrus Inc PocketVault P-3X # SYNNIX @@ -676,6 +690,7 @@ # Watchdata 0x163C:0x0407:Watchdata USB Key 0x163C:0x0417:Watchdata USB Key +0x163C:0x0418:Watchdata USB Key # Watchdata W5181 0x163C:0x0A03:Watchdata W5181 diff --git a/src/ccid.c b/src/ccid.c index 5279fbb..edded92 100644 --- a/src/ccid.c +++ b/src/ccid.c @@ -484,6 +484,8 @@ int ccid_open_hack_post(unsigned int reader_index) * The problem is that the PIN code entered using the Secure * Pin Entry function is also sent to the host. */ + + case C3PO_LTC31_v2: ccid_descriptor->bPINSupport = 0; break; diff --git a/src/ccid.h b/src/ccid.h index eed0eca..46afc4c 100644 --- a/src/ccid.h +++ b/src/ccid.h @@ -191,6 +191,7 @@ typedef struct #define GEMALTO_EZIO_CBP 0x08E634C3 #define CARDMAN3121 0x076B3021 #define LTC31 0x07830003 +#define C3PO_LTC31_v2 0x07830006 #define SCR331DI 0x04E65111 #define SCR331DINTTCOM 0x04E65120 #define SDI010 0x04E65121 diff --git a/src/ifdhandler.c b/src/ifdhandler.c index 665681e..5f9ec41 100644 --- a/src/ifdhandler.c +++ b/src/ifdhandler.c @@ -70,7 +70,6 @@ static int DebugInitialized = FALSE; /* local functions */ static void init_driver(void); -static void extra_egt(ATR_t *atr, _ccid_descriptor *ccid_desc, DWORD Protocol); static char find_baud_rate(unsigned int baudrate, unsigned int *list); static unsigned int T0_card_timeout(double f, double d, int TC1, int TC2, int clock_frequency); @@ -717,9 +716,6 @@ EXTERNAL RESPONSECODE IFDHSetProtocolParameters(DWORD Lun, DWORD Protocol, if (ATR_MALFORMED == atr_ret) return IFD_PROTOCOL_NOT_SUPPORTED; - /* Apply Extra EGT patch for bogus cards */ - extra_egt(&atr, ccid_desc, Protocol); - if (SCARD_PROTOCOL_T0 == Protocol) pps[1] |= ATR_PROTOCOL_TYPE_T0; else @@ -1471,7 +1467,7 @@ EXTERNAL RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode, PCSC_TLV_STRUCTURE *pcsc_tlv = (PCSC_TLV_STRUCTURE *)RxBuffer; int readerID = ccid_descriptor -> readerID; - /* we need room for up to five records */ + /* we need room for up to six records */ if (RxLength < 6 * sizeof(PCSC_TLV_STRUCTURE)) return IFD_ERROR_INSUFFICIENT_BUFFER; @@ -2033,83 +2029,6 @@ void init_driver(void) } /* init_driver */ -void extra_egt(ATR_t *atr, _ccid_descriptor *ccid_desc, DWORD Protocol) -{ - /* This function use an EGT value for cards who comply with followings - * criterias: - * - TA1 > 11 - * - current EGT = 0x00 or 0xFF - * - T=0 or (T=1 and CWI >= 2) - * - * Without this larger EGT some non ISO 7816-3 smart cards may not - * communicate with the reader. - * - * This modification is harmless, the reader will just be less restrictive - */ - - unsigned int card_baudrate; - unsigned int default_baudrate; - double f, d; - - /* if TA1 not present */ - if (! atr->ib[0][ATR_INTERFACE_BYTE_TA].present) - return; - - (void)ATR_GetParameter(atr, ATR_PARAMETER_D, &d); - (void)ATR_GetParameter(atr, ATR_PARAMETER_F, &f); - - /* may happen with non ISO cards */ - if ((0 == f) || (0 == d)) - return; - - /* Baudrate = f x D/F */ - card_baudrate = (unsigned int) (1000 * ccid_desc->dwDefaultClock * d / f); - - default_baudrate = (unsigned int) (1000 * ccid_desc->dwDefaultClock - * ATR_DEFAULT_D / ATR_DEFAULT_F); - - /* TA1 > 11? */ - if (card_baudrate <= default_baudrate) - return; - - /* Current EGT = 0 or FF? */ - if (atr->ib[0][ATR_INTERFACE_BYTE_TC].present && - ((0x00 == atr->ib[0][ATR_INTERFACE_BYTE_TC].value) || - (0xFF == atr->ib[0][ATR_INTERFACE_BYTE_TC].value))) - { - if (SCARD_PROTOCOL_T0 == Protocol) - { - /* Init TC1 */ - atr->ib[0][ATR_INTERFACE_BYTE_TC].present = TRUE; - atr->ib[0][ATR_INTERFACE_BYTE_TC].value = 2; - DEBUG_INFO1("Extra EGT patch applied"); - } - - if (SCARD_PROTOCOL_T1 == Protocol) - { - int i; - - /* TBi (i>2) present? BWI/CWI */ - for (i=2; i= 2 ? */ - if (atr->ib[i][ATR_INTERFACE_BYTE_TB].present && - ((atr->ib[i][ATR_INTERFACE_BYTE_TB].value & 0x0F) >= 2)) - { - /* Init TC1 */ - atr->ib[0][ATR_INTERFACE_BYTE_TC].present = TRUE; - atr->ib[0][ATR_INTERFACE_BYTE_TC].value = 2; - DEBUG_INFO1("Extra EGT patch applied"); - - /* only the first TBi (i>2) must be used */ - break; - } - } - } - } -} /* extra_egt */ - - static char find_baud_rate(unsigned int baudrate, unsigned int *list) { int i;