diff -Nru acsccid-1.1.6/ChangeLog acsccid-1.1.7/ChangeLog --- acsccid-1.1.6/ChangeLog 2018-10-29 03:17:41.000000000 +0000 +++ acsccid-1.1.7/ChangeLog 2019-07-24 02:59:48.000000000 +0000 @@ -1,3 +1,57 @@ +2019-07-23 Godfrey Chung + + * README: Update README for v1.1.7. + +2019-07-23 Godfrey Chung + + * configure.ac: Update the version to 1.1.7 in configure.ac. + +2019-07-23 Godfrey Chung + + * src/ifdhandler.c: Update the copyright in src/ifdhandler.c. + +2019-07-23 Godfrey Chung + + * src/ccid_usb.c: Update the copyright in src/ccid_usb.c. + +2019-06-28 Godfrey Chung + + * MacOSX/configure: MacOSX/configure: fix checking error for dynamic + library libusb The directory may contain other dynamic libraries and therefore + libusb is incorrectly found. + +2019-05-22 Godfrey Chung + + * src/supported_readers.txt: Add supported readers. ACR3201 ICC Reader + +2019-05-22 Godfrey Chung + + * src/supported_readers.txt: Add supported readers. CryptoMate EVO + +2019-04-25 Godfrey Chung + + * src/Makefile.am: Do not build simclist with (unused) file dump + option. Merge from ccid 1.4.5. + +2019-04-10 Godfrey Chung + + * src/ccid_usb.c, src/ifdhandler.c: Fix APG8201 response timeout + issue. APG8201 cannot process requests from bulk and interrupt endpoint + concurrently. To fix the issue, access from interrupt endpoint + should be disabled. + +2018-11-29 Godfrey Chung + + * src/ccid_usb.c: Fix configuration descriptor issue on macOS in + OpenUSBByName(). Sometimes the reader failed to select the configuration in the + kernel. Therefore, the driver needs to select it again. + +2018-11-23 Godfrey Chung + + * src/ccid.h, src/ccid_usb.c, src/ifdhandler.c: Fix card detection + issue for multi-slot readers on macOS. ifdreader do the following tasks at the same time: - After calling IFDHCreateChannelByName() to open a slot, call IFDHPowerICC() to power on the slot if there is a card. - Call IFDHCreateChannelByName() to open other slots. Therefore, IFDHICCPresence() should not return the actual slot + status until the last slot was opened. + 2018-10-29 Godfrey Chung * README: Update README for v1.1.6. diff -Nru acsccid-1.1.6/config/ltmain.sh acsccid-1.1.7/config/ltmain.sh --- acsccid-1.1.6/config/ltmain.sh 2018-10-29 03:17:15.000000000 +0000 +++ acsccid-1.1.7/config/ltmain.sh 2019-07-24 02:58:54.000000000 +0000 @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-6" +VERSION="2.4.6 Debian-2.4.6-9" package_revision=2.4.6 @@ -64,7 +64,7 @@ # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-10-04.22; # UTC +scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 @@ -1091,57 +1091,6 @@ } -# func_quote ARG -# -------------- -# Aesthetically quote one ARG, store the result into $func_quote_result. Note -# that we keep attention to performance here (so far O(N) complexity as long as -# func_append is O(1)). -func_quote () -{ - $debug_cmd - - func_quote_result=$1 - - case $func_quote_result in - *[\\\`\"\$]*) - case $func_quote_result in - *[\[\*\?]*) - func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"` - return 0 - ;; - esac - - func_quote_old_IFS=$IFS - for _G_char in '\' '`' '"' '$' - do - # STATE($1) PREV($2) SEPARATOR($3) - set start "" "" - func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy - IFS=$_G_char - for _G_part in $func_quote_result - do - case $1 in - quote) - func_append func_quote_result "$3$2" - set quote "$_G_part" "\\$_G_char" - ;; - start) - set first "" "" - func_quote_result= - ;; - first) - set quote "$_G_part" "" - ;; - esac - done - IFS=$func_quote_old_IFS - done - ;; - *) ;; - esac -} - - # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. @@ -1158,8 +1107,12 @@ func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do - func_quote "$1" - _G_unquoted_arg=$func_quote_result + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else @@ -2188,7 +2141,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-6 + version: $progname $scriptversion Debian-2.4.6-9 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -5397,8 +5350,7 @@ if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - func_quote "$ECHO" - qECHO=$func_quote_result + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -7415,10 +7367,11 @@ # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC -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=*) + -specs=*|-fsanitize=*|-fuse-ld=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" @@ -10655,8 +10608,8 @@ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done - func_quote "(cd `pwd`; $relink_command)" - relink_command=$func_quote_result + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. @@ -10902,8 +10855,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - func_quote "$relink_command" - relink_command=$func_quote_result + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi diff -Nru acsccid-1.1.6/configure acsccid-1.1.7/configure --- acsccid-1.1.6/configure 2018-10-29 03:17:17.000000000 +0000 +++ acsccid-1.1.7/configure 2019-07-24 02:58:57.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for acsccid 1.1.6. +# Generated by GNU Autoconf 2.69 for acsccid 1.1.7. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='acsccid' PACKAGE_TARNAME='acsccid' -PACKAGE_VERSION='1.1.6' -PACKAGE_STRING='acsccid 1.1.6' +PACKAGE_VERSION='1.1.7' +PACKAGE_STRING='acsccid 1.1.7' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1370,7 +1370,7 @@ # 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 acsccid 1.1.6 to adapt to many kinds of systems. +\`configure' configures acsccid 1.1.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1441,7 +1441,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of acsccid 1.1.6:";; + short | recursive ) echo "Configuration of acsccid 1.1.7:";; esac cat <<\_ACEOF @@ -1578,7 +1578,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -acsccid configure 1.1.6 +acsccid configure 1.1.7 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1997,7 +1997,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by acsccid $as_me 1.1.6, which was +It was created by acsccid $as_me 1.1.7, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2861,7 +2861,7 @@ # Define the identity of the package. PACKAGE='acsccid' - VERSION='1.1.6' + VERSION='1.1.7' cat >>confdefs.h <<_ACEOF @@ -15562,7 +15562,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by acsccid $as_me 1.1.6, which was +This file was extended by acsccid $as_me 1.1.7, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15628,7 +15628,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -acsccid config.status 1.1.6 +acsccid config.status 1.1.7 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru acsccid-1.1.6/configure.ac acsccid-1.1.7/configure.ac --- acsccid-1.1.6/configure.ac 2018-10-29 03:15:12.000000000 +0000 +++ acsccid-1.1.7/configure.ac 2019-07-24 02:53:44.000000000 +0000 @@ -4,7 +4,7 @@ # Require autoconf 2.61 AC_PREREQ([2.69]) -AC_INIT([acsccid], [1.1.6]) +AC_INIT([acsccid], [1.1.7]) AC_CONFIG_SRCDIR(src/ifdhandler.c) AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE(1.8 dist-bzip2 no-dist-gzip foreign subdir-objects) diff -Nru acsccid-1.1.6/debian/changelog acsccid-1.1.7/debian/changelog --- acsccid-1.1.6/debian/changelog 2018-10-29 03:45:21.000000000 +0000 +++ acsccid-1.1.7/debian/changelog 2019-07-24 03:11:16.000000000 +0000 @@ -1,3 +1,11 @@ +acsccid (1.1.7-1) unstable; urgency=low + + * New upstream release. + * Updated Standards-Version to 4.4.0. + * Updated debian/copyright. + + -- Godfrey Chung Wed, 24 Jul 2019 11:11:16 +0800 + acsccid (1.1.6-1) unstable; urgency=low * New upstream release. diff -Nru acsccid-1.1.6/debian/control acsccid-1.1.7/debian/control --- acsccid-1.1.6/debian/control 2018-10-29 03:45:21.000000000 +0000 +++ acsccid-1.1.7/debian/control 2019-07-24 03:11:16.000000000 +0000 @@ -10,7 +10,7 @@ libusb-1.0-0-dev, perl, pkg-config -Standards-Version: 4.2.1 +Standards-Version: 4.4.0 Homepage: http://acsccid.sourceforge.net/ Package: libacsccid1 diff -Nru acsccid-1.1.6/debian/copyright acsccid-1.1.7/debian/copyright --- acsccid-1.1.6/debian/copyright 2018-10-29 03:45:21.000000000 +0000 +++ acsccid-1.1.7/debian/copyright 2019-07-24 03:11:16.000000000 +0000 @@ -1,12 +1,12 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: acsccid Upstream-Contact: Advanced Card Systems Ltd. -Source: http://sourceforge.net/projects/acsccid/files/ -Copyright: 2009-2018 Advanced Card Systems Ltd. +Source: https://sourceforge.net/projects/acsccid/files/ +Copyright: 2009-2019 Advanced Card Systems Ltd. License: LGPL-2.1+ Files: * -Copyright: 2009-2018 Advanced Card Systems Ltd. +Copyright: 2009-2019 Advanced Card Systems Ltd. License: LGPL-2.1+ Files: config/config.rpath @@ -14,13 +14,13 @@ License: public-domain Files: debian/* -Copyright: 2011-2018 Godfrey Chung +Copyright: 2011-2019 Godfrey Chung License: LGPL-2.1+ Files: m4/ax_pthread.m4 Copyright: 2008 Steven G. Johnson 2011 Daniel Richard G. -License: GPL-3 +License: GPL-3+ Files: m4/iconv.m4 Copyright: 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. @@ -41,7 +41,7 @@ License: LGPL-2+ Files: src/* -Copyright: 2009-2018 Advanced Card Systems Ltd. +Copyright: 2009-2019 Advanced Card Systems Ltd. 2003-2011 Ludovic Rousseau 2005 Martin Paljak License: LGPL-2.1+ @@ -143,7 +143,7 @@ On Debian systems, the complete text of the GNU Lesser General Public License can be found in "/usr/share/common-licenses/LGPL-2.1". -License: GPL-3 +License: GPL-3+ 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 the Free Software Foundation, either version 3 of the License, or @@ -155,7 +155,7 @@ GNU General Public License for more details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". diff -Nru acsccid-1.1.6/MacOSX/configure acsccid-1.1.7/MacOSX/configure --- acsccid-1.1.6/MacOSX/configure 2018-10-29 03:15:12.000000000 +0000 +++ acsccid-1.1.7/MacOSX/configure 2019-07-23 03:21:45.000000000 +0000 @@ -48,7 +48,7 @@ LIBUSB_CFLAGS=$(pkg-config --cflags --static libusb-1.0) LIBUSB_LIBS=$(pkg-config --libs --static libusb-1.0) -if ls "$LIBUSB_DIR"/*.dylib 2> /dev/null +if ls "$LIBUSB_DIR"/libusb-1.0*.dylib 2> /dev/null then echo -en $RED echo "*****************************" diff -Nru acsccid-1.1.6/README acsccid-1.1.7/README --- acsccid-1.1.6/README 2018-10-29 03:15:12.000000000 +0000 +++ acsccid-1.1.7/README 2019-07-24 02:54:58.000000000 +0000 @@ -49,6 +49,7 @@ ---- ---- ------------------- ----------------------------- 072F B301 ACR32-A1 ACS ACR32 ICC Reader 072F B304 ACR3201-A1 ACS ACR3201 ICC Reader +072F B305 ACR3201 ACS ACR3201 ICC Reader 072F 8300 ACR33U-A1 ACS ACR33U-A1 3SAM ICC Reader 072F 8302 ACR33U-A2 ACS ACR33U-A2 3SAM ICC Reader 072F 8307 ACR33U-A3 ACS ACR33U-A3 3SAM ICC Reader @@ -134,6 +135,7 @@ 072F 90DB CryptoMate64 ACS CryptoMate64 072F B200 ACOS5T1 ACS CryptoMate (T1) 072F B106 ACOS5T2 ACS CryptoMate (T2) +072F B112 ACOS5T2 ACS CryptoMate EVO non-CCID Readers @@ -150,6 +152,17 @@ History ------- +v1.1.7 (24/7/2019) +- Add the following readers support: + ACR3201 ICC Reader + CryptoMate EVO +- Fix card detection issue for multi-slot readers on macOS. +- Fix configuration descriptor issue on macOS in OpenUSBByName(). +- Fix APG8201 response timeout issue. +- Merge with ccid 1.4.5. + - Do not build simclist with (unused) file dump option. +- MacOSX/configure: fix checking error for dynamic library libusb. + v1.1.6 (29/10/2018) - Add the following readers support: ACR1252 CL Reader (ACM1252U-Z2ACE) @@ -526,7 +539,7 @@ ------------------------------------------------------------------------------- -Copyright (C) 2009-2018 Advanced Card Systems Ltd. +Copyright (C) 2009-2019 Advanced Card Systems Ltd. Copyright (C) 2003-2011 Ludovic Rousseau Copyright (C) 2000-2001 Carlos Prados Copyright (C) 2003 Olaf Kirch diff -Nru acsccid-1.1.6/src/ccid.h acsccid-1.1.7/src/ccid.h --- acsccid-1.1.6/src/ccid.h 2018-10-29 03:15:12.000000000 +0000 +++ acsccid-1.1.7/src/ccid.h 2019-07-23 03:21:45.000000000 +0000 @@ -150,6 +150,10 @@ // Lock for array of bStatus pthread_mutex_t bStatusLock; pthread_mutex_t *pbStatusLock; + + /* True if the last slot was opened. */ + int lastSlotOpened; + int *pLastSlotOpened; #endif // Firmware fix enabled diff -Nru acsccid-1.1.6/src/ccid_usb.c acsccid-1.1.7/src/ccid_usb.c --- acsccid-1.1.6/src/ccid_usb.c 2018-10-29 03:15:12.000000000 +0000 +++ acsccid-1.1.7/src/ccid_usb.c 2019-07-24 02:53:44.000000000 +0000 @@ -1,7 +1,7 @@ /* ccid_usb.c: USB access routines using the libusb library Copyright (C) 2003-2010 Ludovic Rousseau - Copyright (C) 2009-2018 Advanced Card Systems Ltd. + Copyright (C) 2009-2019 Advanced Card Systems Ltd. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -109,6 +109,7 @@ #ifdef __APPLE__ // Thread handle for card detection pthread_t hThread; + int threadCreated; // Flag to terminate thread int terminated; @@ -660,19 +661,14 @@ * So on Mac OS X the reader configuration is not done * by the OS/kernel and we do it ourself. */ - if ((0xFF == desc.bDeviceClass) - && (0xFF == desc.bDeviceSubClass) - && (0xFF == desc.bDeviceProtocol)) + r = libusb_set_configuration(dev_handle, 1); + if (r < 0) { - r = libusb_set_configuration(dev_handle, 1); - if (r < 0) - { - (void)libusb_close(dev_handle); - DEBUG_CRITICAL4("Can't set configuration on %d/%d: %s", - bus_number, device_address, - libusb_error_name(r)); - continue; - } + (void)libusb_close(dev_handle); + DEBUG_CRITICAL4("Can't set configuration on %d/%d: %s", + bus_number, device_address, + libusb_error_name(r)); + continue; } /* recall */ @@ -1043,7 +1039,10 @@ usbDevice[reader_index].pTerminated = &usbDevice[reader_index].terminated; usbDevice[reader_index].pTransfer = &usbDevice[reader_index].polling_transfer; usbDevice[reader_index].pTransferLock = &usbDevice[reader_index].transferLock; + usbDevice[reader_index].threadCreated = FALSE; usbDevice[reader_index].ccid.pbStatusLock = &usbDevice[reader_index].ccid.bStatusLock; + usbDevice[reader_index].ccid.lastSlotOpened = FALSE; + usbDevice[reader_index].ccid.pLastSlotOpened = &usbDevice[reader_index].ccid.lastSlotOpened; // Create transfer lock r = pthread_mutex_init(usbDevice[reader_index].pTransferLock, NULL); @@ -1068,6 +1067,15 @@ goto end2; } + /* Disable card detection thread for APG8201 series. */ + if ((usbDevice[reader_index].ccid.readerID == ACS_APG8201) + || (usbDevice[reader_index].ccid.readerID == ACS_APG8201_B2) + || (usbDevice[reader_index].ccid.readerID == ACS_APG8201Z) + || (usbDevice[reader_index].ccid.readerID == ACS_APG8201Z2)) + { + goto end; + } + // Create thread for card detection r = pthread_create(&usbDevice[reader_index].hThread, NULL, CardDetectionThread, (void *) (intptr_t) reader_index); if (r != 0) @@ -1081,6 +1089,8 @@ return_value = STATUS_UNSUCCESSFUL; goto end2; } + + usbDevice[reader_index].threadCreated = TRUE; #endif goto end; } @@ -1365,28 +1375,32 @@ DEBUG_COMM("Last slot closed. Release resources"); #ifdef __APPLE__ - DEBUG_INFO3("Terminating thread: %d/%d", - usbDevice[reader_index].bus_number, - usbDevice[reader_index].device_address); + if (usbDevice[reader_index].threadCreated) + { + DEBUG_INFO3("Terminating thread: %d/%d", + usbDevice[reader_index].bus_number, + usbDevice[reader_index].device_address); - // Terminate thread - *usbDevice[reader_index].pTerminated = TRUE; + // Terminate thread + *usbDevice[reader_index].pTerminated = TRUE; - // Lock transfer - pthread_mutex_lock(usbDevice[reader_index].pTransferLock); + // Lock transfer + pthread_mutex_lock(usbDevice[reader_index].pTransferLock); - // Cancel transfer - if (*usbDevice[reader_index].pTransfer != NULL) - { - libusb_cancel_transfer(*usbDevice[reader_index].pTransfer); - *usbDevice[reader_index].pTransfer = NULL; - } + // Cancel transfer + if (*usbDevice[reader_index].pTransfer != NULL) + { + libusb_cancel_transfer(*usbDevice[reader_index].pTransfer); + *usbDevice[reader_index].pTransfer = NULL; + } - // Unlock transfer - pthread_mutex_unlock(usbDevice[reader_index].pTransferLock); + // Unlock transfer + pthread_mutex_unlock(usbDevice[reader_index].pTransferLock); - // Wait thread - pthread_join(usbDevice[reader_index].hThread, NULL); + // Wait thread + pthread_join(usbDevice[reader_index].hThread, NULL); + usbDevice[reader_index].threadCreated = FALSE; + } // Free bStatus lock pthread_mutex_destroy(usbDevice[reader_index].ccid.pbStatusLock); diff -Nru acsccid-1.1.6/src/ifdhandler.c acsccid-1.1.7/src/ifdhandler.c --- acsccid-1.1.6/src/ifdhandler.c 2018-10-29 03:15:12.000000000 +0000 +++ acsccid-1.1.7/src/ifdhandler.c 2019-07-24 02:53:44.000000000 +0000 @@ -1,7 +1,7 @@ /* ifdhandler.c: IFDH API Copyright (C) 2003-2010 Ludovic Rousseau - Copyright (C) 2009-2018 Advanced Card Systems Ltd. + Copyright (C) 2009-2019 Advanced Card Systems Ltd. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -344,6 +344,14 @@ DEBUG_INFO2("bVoltageSupport: 0x%02X", ccid_descriptor->bVoltageSupport); } +#ifdef __APPLE__ + if (ccid_descriptor->bCurrentSlotIndex == ccid_descriptor->bMaxSlotIndex) + { + /* Last slot was opened. */ + *(ccid_descriptor->pLastSlotOpened) = TRUE; + } +#endif + return return_value; } /* CreateChannelByNameOrChannel */ @@ -672,6 +680,15 @@ ccid_desc = get_ccid_descriptor(reader_index); + /* Disable polling thread for APG8201 series. */ + if ((ccid_desc->readerID == ACS_APG8201) + || (ccid_desc->readerID == ACS_APG8201_B2) + || (ccid_desc->readerID == ACS_APG8201Z) + || (ccid_desc->readerID == ACS_APG8201Z2)) + { + break; + } + /* CCID and not ICCD */ if (((PROTOCOL_CCID == ccid_desc -> bInterfaceProtocol) || (PROTOCOL_ACR38 == ccid_desc -> bInterfaceProtocol)) @@ -719,6 +736,16 @@ *Length = 0; ccid_desc = get_ccid_descriptor(reader_index); + + /* Disable polling thread for APG8201 series. */ + if ((ccid_desc->readerID == ACS_APG8201) + || (ccid_desc->readerID == ACS_APG8201_B2) + || (ccid_desc->readerID == ACS_APG8201Z) + || (ccid_desc->readerID == ACS_APG8201Z2)) + { + break; + } + /* CCID and not ICCD */ if (((PROTOCOL_CCID == ccid_desc -> bInterfaceProtocol) || (PROTOCOL_ACR38 == ccid_desc -> bInterfaceProtocol)) @@ -2702,6 +2729,15 @@ ccid_descriptor = get_ccid_descriptor(reader_index); +#ifdef __APPLE__ + /* Return no card if the last slot was not opened. */ + if (!*(ccid_descriptor->pLastSlotOpened)) + { + return_value = IFD_ICC_NOT_PRESENT; + goto end; + } +#endif + // Get slot index slot_index = ccid_descriptor->bCurrentSlotIndex; diff -Nru acsccid-1.1.6/src/Makefile.am acsccid-1.1.7/src/Makefile.am --- acsccid-1.1.6/src/Makefile.am 2018-10-29 03:15:12.000000000 +0000 +++ acsccid-1.1.7/src/Makefile.am 2019-07-23 03:21:45.000000000 +0000 @@ -42,7 +42,7 @@ libacsccid_la_SOURCES = $(COMMON) $(USB) $(TOKEN_PARSER) $(PROVIDED_BY_PCSC) $(T1) libacsccid_la_LIBADD = $(LIBUSB_LIBS) $(PTHREAD_LIBS) $(LTLIBICONV) libacsccid_la_CFLAGS = $(PCSC_CFLAGS) $(LIBUSB_CFLAGS) $(PTHREAD_CFLAGS) \ - $(SYMBOL_VISIBILITY) -D$(CCID_VERSION) + $(SYMBOL_VISIBILITY) -D$(CCID_VERSION) -DSIMCLIST_NO_DUMPRESTORE libacsccid_la_LDFLAGS = -avoid-version EXTRA_DIST = Info.plist.src create_Info_plist.pl supported_readers.txt \ diff -Nru acsccid-1.1.6/src/Makefile.in acsccid-1.1.7/src/Makefile.in --- acsccid-1.1.6/src/Makefile.in 2018-10-29 03:17:19.000000000 +0000 +++ acsccid-1.1.7/src/Makefile.in 2019-07-24 02:58:58.000000000 +0000 @@ -433,7 +433,7 @@ libacsccid_la_SOURCES = $(COMMON) $(USB) $(TOKEN_PARSER) $(PROVIDED_BY_PCSC) $(T1) libacsccid_la_LIBADD = $(LIBUSB_LIBS) $(PTHREAD_LIBS) $(LTLIBICONV) libacsccid_la_CFLAGS = $(PCSC_CFLAGS) $(LIBUSB_CFLAGS) $(PTHREAD_CFLAGS) \ - $(SYMBOL_VISIBILITY) -D$(CCID_VERSION) + $(SYMBOL_VISIBILITY) -D$(CCID_VERSION) -DSIMCLIST_NO_DUMPRESTORE libacsccid_la_LDFLAGS = -avoid-version EXTRA_DIST = Info.plist.src create_Info_plist.pl supported_readers.txt \ diff -Nru acsccid-1.1.6/src/supported_readers.txt acsccid-1.1.7/src/supported_readers.txt --- acsccid-1.1.6/src/supported_readers.txt 2018-10-29 03:15:12.000000000 +0000 +++ acsccid-1.1.7/src/supported_readers.txt 2019-07-24 02:53:44.000000000 +0000 @@ -10,6 +10,9 @@ # ACR3201-A1 0x072f:0xb304:ACS ACR3201 ICC Reader +# ACR3201 +0x072f:0xb305:ACS ACR3201 ICC Reader + # ACR33U-A1 0x072f:0x8300:ACS ACR33U-A1 3SAM ICC Reader @@ -241,6 +244,9 @@ # CryptoMate T2 0x072f:0xb106:ACS CryptoMate (T2) +# CryptoMate T2 (ACOS5-EVO) +0x072f:0xb112:ACS CryptoMate EVO + # # non-CCID readers #