diff --git a/SOURCES/esc-1.1.2-fix8.patch b/SOURCES/esc-1.1.2-fix8.patch new file mode 100644 index 0000000..4231b9b --- /dev/null +++ b/SOURCES/esc-1.1.2-fix8.patch @@ -0,0 +1,60 @@ +diff -up ./esc/src/app/opensc.esc.conf.fix8 ./esc/src/app/opensc.esc.conf +--- ./esc/src/app/opensc.esc.conf.fix8 2020-08-07 16:17:37.464650003 -0700 ++++ ./esc/src/app/opensc.esc.conf 2020-08-07 16:20:21.861957011 -0700 +@@ -89,12 +89,12 @@ app default { + } + reader_driver openct { + }; +- card_drivers = coolkey, cac,cac1, piv, default; ++ card_drivers = coolkey, cac,cac1, PIV-II, default; + secure_messaging local_authentic { + module_path = /usr/lib64; + } + framework pkcs15 { +- builtin_emulators = coolkey, cac, cac1, piv; ++ builtin_emulators = coolkey, cac, cac1, PIV-II; + } + } + app opensc-pkcs11 { +diff -up ./esc/src/lib/coolkey/CoolKey.cpp.fix8 ./esc/src/lib/coolkey/CoolKey.cpp +--- ./esc/src/lib/coolkey/CoolKey.cpp.fix8 2020-08-07 12:05:35.982966019 -0700 ++++ ./esc/src/lib/coolkey/CoolKey.cpp 2020-08-07 16:08:16.747602873 -0700 +@@ -593,6 +593,7 @@ char *CoolKeyGetFullReaderName(const cha + } else { + fullReaderName = strdup(thisReader); + PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyGetFullReaderName correct full name: %s \n",fullReaderName,GetTStamp(tBuff,56))); ++ break; + } + } + +diff -up ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix8 ./esc/src/lib/coolkey/CoolKeyHandler.cpp +--- ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix8 2020-08-07 12:05:44.394982245 -0700 ++++ ./esc/src/lib/coolkey/CoolKeyHandler.cpp 2020-08-07 16:10:35.504862004 -0700 +@@ -2225,8 +2225,17 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co + HRESULT hres,atrRes,cycleRes,cuidRes; + + char *readerName = PK11_GetSlotName(aSlot); ++ int readerNameLen = strlen(readerName); + +- char *actualReaderName = CoolKeyGetFullReaderName(readerName); ++ //Since there is no local support to get a reader name by slot, ++ //Will simply do a partial substring compare, using less characters ++ //to avoid any hard coded trailing chars. ++ ++ char partialReaderName[60]; ++ memset(partialReaderName, 0, 60); ++ ++ strncpy(partialReaderName,readerName, 59); ++ char *actualReaderName = CoolKeyGetFullReaderName(partialReaderName); + + memset((void *) &tokenInfo,0,sizeof(tokenInfo)); + ATR.data = NULL; // initialize for error processing +@@ -2348,7 +2357,7 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co + if(isACOOLKey && cuidRes == E_FAIL) { + //Let's try to get the cuid directly from the token. + +- cuidRes = CoolKeyGetCUIDDirectly(cuidChar, 100, readerName); ++ cuidRes = CoolKeyGetCUIDDirectly(cuidChar, 100, actualReaderName); + + if(cuidRes != S_OK) { + strcpy(info->mCUID, "unknown"); diff --git a/SPECS/esc.spec b/SPECS/esc.spec index fb34e6f..5ee6339 100644 --- a/SPECS/esc.spec +++ b/SPECS/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.2 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -14,6 +14,7 @@ Patch4: esc-1.1.2-fix4.patch Patch5: esc-1.1.2-fix5.patch Patch6: esc-1.1.2-fix6.patch Patch7: esc-1.1.2-fix7.patch +Patch8: esc-1.1.2-fix8.patch #BuildRequires: doxygen fontconfig-devel @@ -79,6 +80,7 @@ cryptographic smartcards. %patch5 -p1 -b .fix5 %patch6 -p1 -b .fix6 %patch7 -p1 -b .fix7 +%patch8 -p1 -b .fix8 %build @@ -147,6 +149,8 @@ cp %{escname}/esc/LICENSE $RPM_BUILD_ROOT/%{docdir} %{_datadir}/%{appdir}/esc.desktop %changelog +* Fri Aug 07 2020 Jack Magne - 1.1.2-13 +- Resolves: rhbz#1848629 - Smartcard is not detected by esc * Sat May 30 2020 Jack Magne - 1.1.2-12 - Resolves: rhbz#1646486 - alt tokens not detected by ESC - Resolves: rhbz#1774750 - ESC's unusual behavior after formatting a blank Gemalto token