Revisions of pcsc-acsccid
Ludwig Nussel (lnussel_factory)
committed
(revision 11)
branch from 15.1
Ludwig Nussel (lnussel_factory)
accepted
request 668667
from
Wolfgang Rosenauer (wrosenauer)
(revision 10)
propose tracking openSUSE:Factory for the 15.1 cycle to get improved hardware support. Risk seems low. old: openSUSE:Leap:15.1/pcsc-acsccid new: openSUSE:Factory/pcsc-acsccid rev 26 Index: pcsc-acsccid.changes =================================================================== --- pcsc-acsccid.changes (revision 9) +++ pcsc-acsccid.changes (revision 26) @@ -1,4 +1,46 @@ ------------------------------------------------------------------- +Wed Jan 2 06:12:01 UTC 2019 - godfrey.chung@acs.com.hk + +- Added missing devices to Enhances:. + * ACM1252U-Z2ACE (VID: 072F, PID: 225B) + * ACM1252U-Z2ACE BL (VID: 072F, PID: 225C) + +------------------------------------------------------------------- +Tue Oct 30 09:07:25 UTC 2018 - godfrey.chung@acs.com.hk + +- Updated to version 1.1.6. + * Add the following readers support: + ACR1252 CL Reader (ACM1252U-Z2ACE) + ACR1252 USB FW_Upgrade v100 (ACM1252U-Z2ACE BL) + * Enable TLV properties for APG8201-B2 in IFDHControl(). + * Enable TLV properties for APG8201-B2 in process_spe_ppdu(). + * Fix ACR39U T=0 APDU problem in CmdXfrBlockTPDU_T0(). + * Return 6B 80 for supported readers in CCID_Receive(). + * Remove extra_egt() causing problems. + * Fix undefined symbol yylex. + * Set the status to absent if SAM reset failed in IFDHPowerICC(). + * Fix libusb config descriptor leak. + * Fix leaking an allocated bundle in case no matching reader was found. + * Enable ICC extended APDU for ACR1281U-C1 >= v526. + * Add IOCTL_SMARTCARD_TOGGLE_CARD_STATE for SAM slot. +- Replaced acsccid-1.1.5-polling-unplug.patch with + acsccid-1.1.6-polling-unplug.patch. + +------------------------------------------------------------------- +Wed Sep 12 09:40:35 UTC 2018 - godfrey.chung@acs.com.hk + +- Backported to SLE 11. + * Set libusb version to 1.0.8. + * Set pcsc-lite version to 1.4.102. + * Added acsccid-1.1.5-libhal.patch: Fix the compatibility with libhal. + * Added acsccid-1.1.5-polling-thread.patch: Add polling thread support for + slot status. + * Added acsccid-1.1.5-polling-unplug.patch: Let pcsc-lite delay the polling if + the reader is unplugged. + * Added acsccid-1.1.5-libusb-1.0.8.patch: Fix the compatibility with libusb + 1.0.8. + +------------------------------------------------------------------- Wed Oct 25 03:57:55 UTC 2017 - godfrey.chung@acs.com.hk - Updated to version 1.1.5. Index: pcsc-acsccid.spec =================================================================== --- pcsc-acsccid.spec (revision 9) +++ pcsc-acsccid.spec (revision 26) @@ -1,8 +1,8 @@ # # spec file for package pcsc-acsccid # -# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany. -# Copyright (c) 2017 Advanced Card Systems Ltd. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 Advanced Card Systems Ltd. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,25 +25,43 @@ %endif %endif +%if 0%{?sles_version} == 11 +%define libusb_ver 1.0.8 +%define pcsc_lite_ver 1.4.102 +%else +%define libusb_ver 1.0.9 +%define pcsc_lite_ver 1.8.3 +%endif + Name: pcsc-acsccid %define _name acsccid BuildRequires: flex -BuildRequires: libusb-1_0-devel >= 1.0.9 -BuildRequires: pcsc-lite-devel >= 1.8.3 +BuildRequires: libusb-1_0-devel >= %{libusb_ver} +BuildRequires: pcsc-lite-devel >= %{pcsc_lite_ver} BuildRequires: pkg-config %if 0%{?suse_version} >= 1140 BuildRequires: udev %endif -Version: 1.1.5 +Version: 1.1.6 Release: 0 Url: http://acsccid.sourceforge.net/ Summary: PCSC Driver for ACS CCID Based Smart Card Readers -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Productivity/Security Source: http://downloads.sourceforge.net/%{_name}/%{_name}-%{version}.tar.bz2 Source1: %{name}-rpmlintrc +%if 0%{?sles_version} == 11 +# PATCH-FIX-SLE acsccid-1.1.5-libhal.patch godfrey.chung@acs.com.hk -- Fix the compatibility with libhal. +Patch0: %{_name}-1.1.5-libhal.patch +# PATCH-FIX-SLE acsccid-1.1.5-polling-thread.patch godfrey.chung@acs.com.hk -- Add polling thread support for slot status. +Patch1: %{_name}-1.1.5-polling-thread.patch +# PATCH-FIX-SLE acsccid-1.1.6-polling-unplug.patch godfrey.chung@acs.com.hk -- Let pcsc-lite delay the polling if the reader is unplugged. +Patch2: %{_name}-1.1.6-polling-unplug.patch +# PATCH-FIX-SLE acsccid-1.1.5-libusb-1.0.8.patch godfrey.chung@acs.com.hk -- Fix the compatibility with libusb 1.0.8. +Patch3: %{_name}-1.1.5-libusb-1.0.8.patch +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires: pcsc-lite >= 1.8.3 +Requires: pcsc-lite >= %{pcsc_lite_ver} %define ifddir %(pkg-config libpcsclite --variable=usbdropdir) Enhances: modalias(usb:v072FpB301d*dc*dsc*dp*ic*isc*ip*) @@ -94,6 +112,8 @@ Enhances: modalias(usb:v072Fp223Dd*dc*dsc*dp*ic*isc*ip*) Enhances: modalias(usb:v072Fp2244d*dc*dsc*dp*ic*isc*ip*) Enhances: modalias(usb:v072Fp2259d*dc*dsc*dp*ic*isc*ip*) +Enhances: modalias(usb:v072Fp225Bd*dc*dsc*dp*ic*isc*ip*) +Enhances: modalias(usb:v072Fp225Cd*dc*dsc*dp*ic*isc*ip*) Enhances: modalias(usb:v072Fp223Fd*dc*dsc*dp*ic*isc*ip*) Enhances: modalias(usb:v072Fp2239d*dc*dsc*dp*ic*isc*ip*) Enhances: modalias(usb:v072Fp2211d*dc*dsc*dp*ic*isc*ip*) @@ -142,11 +162,24 @@ %prep %setup -q -n %{_name}-%{version} +%if 0%{?sles_version} == 11 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%endif cp -a src/openct/LICENSE LICENSE.openct cp -a src/towitoko/README README.towitoko %build +%if 0%{?sles_version} == 11 +%configure \ + PCSC_CFLAGS="-I%{_builddir}/%{_name}-%{version}/MacOSX" \ + PCSC_LIBS="%(pkg-config --libs libpcsclite 2>/dev/null)" \ + --enable-composite-as-multislot +%else %configure +%endif make %{?jobs:-j%jobs} %install Index: acsccid-1.1.5-libhal.patch =================================================================== --- acsccid-1.1.5-libhal.patch (added) +++ acsccid-1.1.5-libhal.patch (revision 26) @@ -0,0 +1,54 @@ +Index: acsccid-1.1.5/src/ccid_usb.c +=================================================================== +--- acsccid-1.1.5.orig/src/ccid_usb.c ++++ acsccid-1.1.5/src/ccid_usb.c +@@ -282,13 +282,48 @@ status_t OpenUSBByName(unsigned int read + return STATUS_UNSUCCESSFUL; + } + ++ /* format usb:%04x/%04x:libhal:%s ++ * with %s set to ++ * /org/freedesktop/Hal/devices/usb_device_VID_PID_SERIAL_ifX ++ * VID is VendorID ++ * PID is ProductID ++ * SERIAL is device serial number ++ * X is the interface number ++ */ ++ if ((dirname = strstr(device, "libhal:")) != NULL) ++ { ++ const char *p; ++ ++#define HAL_HEADER "usb_device_" ++ ++ /* parse the hal string */ ++ if ( ++ /* search the last '/' char */ ++ (p = strrchr(dirname, '/')) ++ ++ /* if the string starts with "usb_device_" we continue */ ++ && (0 == strncmp(++p, HAL_HEADER, sizeof(HAL_HEADER)-1)) ++ /* skip the HAL header */ ++ && (p += sizeof(HAL_HEADER)-1) ++ ++ /* search the last '_' */ ++ && (p = strrchr(++p, '_')) ++ && (0 == strncmp(++p, "if", 2)) ++ ) ++ { ++ /* convert the interface number */ ++ interface_number = atoi(p+2); ++ } ++ else ++ DEBUG_CRITICAL2("can't parse using libhal scheme: %s", device); ++ } + /* format usb:%04x/%04x:libudev:%d:%s + * with %d set to + * 01 (or whatever the interface number is) + * and %s set to + * /dev/bus/usb/008/004 + */ +- if ((dirname = strstr(device, "libudev:")) != NULL) ++ else if ((dirname = strstr(device, "libudev:")) != NULL) + { + /* convert the interface number, bus and device ids */ + if (sscanf(dirname + 8, "%d:/dev/bus/usb/%d/%d", &interface_number, &device_bus, &device_addr) == 3) { Index: acsccid-1.1.5-libusb-1.0.8.patch =================================================================== --- acsccid-1.1.5-libusb-1.0.8.patch (added) +++ acsccid-1.1.5-libusb-1.0.8.patch (revision 26) @@ -0,0 +1,64 @@ +Index: acsccid-1.1.5/src/ccid_usb.c +=================================================================== +--- acsccid-1.1.5.orig/src/ccid_usb.c ++++ acsccid-1.1.5/src/ccid_usb.c +@@ -191,6 +191,59 @@ static struct _bogus_firmware Bogus_firm + /* data rates supported by the secondary slots on the GemCore Pos Pro & SIM Pro */ + unsigned int SerialCustomDataRates[] = { GEMPLUS_CUSTOM_DATA_RATES, 0 }; + ++/* Fix the compatibility with libusb 1.0.8. */ ++#define libusb_handle_events_completed(ctx, completed) libusb_handle_events(ctx) ++static const char *libusb_error_name(int error_code) ++{ ++ switch (error_code) ++ { ++ case LIBUSB_ERROR_IO: ++ return "LIBUSB_ERROR_IO"; ++ case LIBUSB_ERROR_INVALID_PARAM: ++ return "LIBUSB_ERROR_INVALID_PARAM"; ++ case LIBUSB_ERROR_ACCESS: ++ return "LIBUSB_ERROR_ACCESS"; ++ case LIBUSB_ERROR_NO_DEVICE: ++ return "LIBUSB_ERROR_NO_DEVICE"; ++ case LIBUSB_ERROR_NOT_FOUND: ++ return "LIBUSB_ERROR_NOT_FOUND"; ++ case LIBUSB_ERROR_BUSY: ++ return "LIBUSB_ERROR_BUSY"; ++ case LIBUSB_ERROR_TIMEOUT: ++ return "LIBUSB_ERROR_TIMEOUT"; ++ case LIBUSB_ERROR_OVERFLOW: ++ return "LIBUSB_ERROR_OVERFLOW"; ++ case LIBUSB_ERROR_PIPE: ++ return "LIBUSB_ERROR_PIPE"; ++ case LIBUSB_ERROR_INTERRUPTED: ++ return "LIBUSB_ERROR_INTERRUPTED"; ++ case LIBUSB_ERROR_NO_MEM: ++ return "LIBUSB_ERROR_NO_MEM"; ++ case LIBUSB_ERROR_NOT_SUPPORTED: ++ return "LIBUSB_ERROR_NOT_SUPPORTED"; ++ case LIBUSB_ERROR_OTHER: ++ return "LIBUSB_ERROR_OTHER"; ++ ++ case LIBUSB_TRANSFER_ERROR: ++ return "LIBUSB_TRANSFER_ERROR"; ++ case LIBUSB_TRANSFER_TIMED_OUT: ++ return "LIBUSB_TRANSFER_TIMED_OUT"; ++ case LIBUSB_TRANSFER_CANCELLED: ++ return "LIBUSB_TRANSFER_CANCELLED"; ++ case LIBUSB_TRANSFER_STALL: ++ return "LIBUSB_TRANSFER_STALL"; ++ case LIBUSB_TRANSFER_NO_DEVICE: ++ return "LIBUSB_TRANSFER_NO_DEVICE"; ++ case LIBUSB_TRANSFER_OVERFLOW: ++ return "LIBUSB_TRANSFER_OVERFLOW"; ++ ++ case 0: ++ return "LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED"; ++ default: ++ return "**UNKNOWN**"; ++ } ++} ++ + /***************************************************************************** + * + * close_libusb_if_needed Index: acsccid-1.1.5-polling-thread.patch =================================================================== --- acsccid-1.1.5-polling-thread.patch (added) +++ acsccid-1.1.5-polling-thread.patch (revision 26) @@ -0,0 +1,94 @@ +Index: acsccid-1.1.5/src/ifdhandler.c +=================================================================== +--- acsccid-1.1.5.orig/src/ifdhandler.c ++++ acsccid-1.1.5/src/ifdhandler.c +@@ -427,7 +427,7 @@ EXTERNAL RESPONSECODE IFDHCloseChannel(D + + + #if !defined(TWIN_SERIAL) +-static RESPONSECODE IFDHPolling(DWORD Lun, int timeout) ++static RESPONSECODE IFDHPollingWithTimeout(DWORD Lun, int timeout) + { + int reader_index; + +@@ -444,7 +444,7 @@ static RESPONSECODE IFDHPolling(DWORD Lu + + /* on an ICCD device the card is always inserted + * so no card movement will ever happen: just do nothing */ +-static RESPONSECODE IFDHSleep(DWORD Lun, int timeout) ++static RESPONSECODE IFDHSleepWithTimeout(DWORD Lun, int timeout) + { + int reader_index; + +@@ -478,6 +478,16 @@ static RESPONSECODE IFDHStopPolling(DWOR + (void)InterruptStop(reader_index); + return IFD_SUCCESS; + } ++ ++static RESPONSECODE IFDHPolling(DWORD Lun) ++{ ++ return IFDHPollingWithTimeout(Lun, 2 * 1000); /* 2 seconds */ ++} ++ ++static RESPONSECODE IFDHSleep(DWORD Lun) ++{ ++ return IFDHSleepWithTimeout(Lun, 10 * 60 * 1000); /* 10 minutes */ ++} + #endif + + +@@ -681,7 +691,7 @@ EXTERNAL RESPONSECODE IFDHGetCapabilitie + { + *Length = sizeof(void *); + if (Value) +- *(void **)Value = IFDHPolling; ++ *(void **)Value = IFDHPollingWithTimeout; + } + + if ((PROTOCOL_ICCD_A == ccid_desc->bInterfaceProtocol) +@@ -689,7 +699,7 @@ EXTERNAL RESPONSECODE IFDHGetCapabilitie + { + *Length = sizeof(void *); + if (Value) +- *(void **)Value = IFDHSleep; ++ *(void **)Value = IFDHSleepWithTimeout; + } + } + break; +@@ -732,6 +742,36 @@ EXTERNAL RESPONSECODE IFDHGetCapabilitie + } + } + break; ++ ++ case TAG_IFD_POLLING_THREAD: ++ { ++ _ccid_descriptor *ccid_desc; ++ ++ /* default value: not supported */ ++ *Length = 0; ++ ++ ccid_desc = get_ccid_descriptor(reader_index); ++ ++ /* CCID and not ICCD */ ++ if (((PROTOCOL_CCID == ccid_desc -> bInterfaceProtocol) ++ || (PROTOCOL_ACR38 == ccid_desc -> bInterfaceProtocol)) ++ /* 3 end points */ ++ && (3 == ccid_desc -> bNumEndpoints)) ++ { ++ *Length = sizeof(void *); ++ if (Value) ++ *(void **)Value = IFDHPolling; ++ } ++ ++ if ((PROTOCOL_ICCD_A == ccid_desc->bInterfaceProtocol) ++ || (PROTOCOL_ICCD_B == ccid_desc->bInterfaceProtocol)) ++ { ++ *Length = sizeof(void *); ++ if (Value) ++ *(void **)Value = IFDHSleep; ++ } ++ } ++ break; + #endif + + case SCARD_ATTR_VENDOR_IFD_SERIAL_NO: Index: acsccid-1.1.6-polling-unplug.patch =================================================================== --- acsccid-1.1.6-polling-unplug.patch (added) +++ acsccid-1.1.6-polling-unplug.patch (revision 26) @@ -0,0 +1,34 @@ +Index: acsccid-1.1.6/src/ccid_usb.c +=================================================================== +--- acsccid-1.1.6.orig/src/ccid_usb.c ++++ acsccid-1.1.6/src/ccid_usb.c +@@ -1808,6 +1808,8 @@ int InterruptRead(int reader_index, int + libusb_free_transfer(transfer); + DEBUG_CRITICAL2("libusb_submit_transfer failed: %s", + libusb_error_name(ret)); ++ if (ret == LIBUSB_ERROR_NO_DEVICE) ++ return IFD_NO_SUCH_DEVICE; + return IFD_COMMUNICATION_ERROR; + } + +@@ -1827,6 +1829,8 @@ int InterruptRead(int reader_index, int + libusb_free_transfer(transfer); + DEBUG_CRITICAL2("libusb_handle_events failed: %s", + libusb_error_name(ret)); ++ if (ret == LIBUSB_ERROR_NO_DEVICE) ++ return IFD_NO_SUCH_DEVICE; + return IFD_COMMUNICATION_ERROR; + } + } +@@ -1881,7 +1885,10 @@ int InterruptRead(int reader_index, int + DEBUG_COMM4("InterruptRead (%d/%d): %d", + usbDevice[reader_index].bus_number, + usbDevice[reader_index].device_address, ret); +- return_value = IFD_COMMUNICATION_ERROR; ++ if (ret == LIBUSB_TRANSFER_NO_DEVICE) ++ return_value = IFD_NO_SUCH_DEVICE; ++ else ++ return_value = IFD_COMMUNICATION_ERROR; + } + + return return_value; Index: acsccid-1.1.6.tar.bz2 =================================================================== Binary file acsccid-1.1.6.tar.bz2 (revision 26) added Index: acsccid-1.1.5.tar.bz2 =================================================================== Binary file acsccid-1.1.5.tar.bz2 (revision 9) deleted
Yuchen Lin (maxlin_factory)
committed
(revision 9)
branch from 15.0
Yuchen Lin (maxlin_factory)
accepted
request 551871
from
Yuchen Lin (maxlin_factory)
(revision 8)
Automated submission of a package from openSUSE:Factory to openSUSE:Leap:15.0 that was included in openSUSE:Leap:42.3
Yuchen Lin (maxlin_factory)
committed
(revision 7)
branch from 15.0
Yuchen Lin (maxlin_factory)
accepted
request 551871
from
Yuchen Lin (maxlin_factory)
(revision 6)
Automated submission of a package from openSUSE:Factory to openSUSE:Leap:15.0 that was included in openSUSE:Leap:42.3
Yuchen Lin (maxlin_factory)
committed
(revision 5)
branch from 15.0
Yuchen Lin (maxlin_factory)
accepted
request 551871
from
Yuchen Lin (maxlin_factory)
(revision 4)
Automated submission of a package from openSUSE:Factory to openSUSE:Leap:15.0 that was included in openSUSE:Leap:42.3
Yuchen Lin (maxlin_factory)
committed
(revision 3)
branch from 15.0
Yuchen Lin (maxlin_factory)
committed
(revision 2)
branch from 15.0
Yuchen Lin (maxlin_factory)
accepted
request 551871
from
Yuchen Lin (maxlin_factory)
(revision 1)
Automated submission of a package from openSUSE:Factory to openSUSE:Leap:15.0 that was included in openSUSE:Leap:42.3
Displaying all 11 revisions