From 1426a8f439e77b8cb2641a4389a6113656de0b95 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 8 Nov 2022 01:45:51 -0500 Subject: [PATCH] import esc-1.1.2-24.el8 --- SOURCES/esc-1.1.2-fix11.patch | 104 ++++++++++++++++++++++++++++++++++ SPECS/esc.spec | 21 +++---- 2 files changed, 115 insertions(+), 10 deletions(-) create mode 100644 SOURCES/esc-1.1.2-fix11.patch diff --git a/SOURCES/esc-1.1.2-fix11.patch b/SOURCES/esc-1.1.2-fix11.patch new file mode 100644 index 0000000..e2e8de0 --- /dev/null +++ b/SOURCES/esc-1.1.2-fix11.patch @@ -0,0 +1,104 @@ +diff -up ./esc/src/app/esc.js.fix11 ./esc/src/app/esc.js +--- ./esc/src/app/esc.js.fix11 2022-06-15 19:12:43.974710780 -0400 ++++ ./esc/src/app/esc.js 2022-06-15 19:12:54.657664269 -0400 +@@ -581,7 +581,6 @@ class ESC { + this._configFile = new GLib.KeyFile(); + + this._configPath = GLib.get_user_config_dir() + "/esc"; +- + let configDir = Gio.File.new_for_path(this._configPath); + + try { +@@ -606,6 +605,9 @@ class ESC { + this._configFile.save_to_file(this._configFileName); + } + } ++ _initConfigTokenManuIDs() { ++ this._setConfigValue("esc.token.manu_id.0","Volkswagen AG"); ++ } + + _buildUI() { + // Create the application window +@@ -637,6 +639,7 @@ class ESC { + + + this._initConfig(); ++ this._initConfigTokenManuIDs(); + this._initProperties(); + + this._statusMessages = null; +diff -up ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix11 ./esc/src/lib/coolkey/CoolKeyHandler.cpp +--- ./esc/src/lib/coolkey/CoolKeyHandler.cpp.fix11 2022-06-15 19:10:26.278310248 -0400 ++++ ./esc/src/lib/coolkey/CoolKeyHandler.cpp 2022-06-15 19:10:46.824220800 -0400 +@@ -63,6 +63,7 @@ static const char *piv_manu_id_1= "piv_ + static PRLogModuleInfo *coolKeyLogHN = PR_NewLogModule("coolKeyHandler"); + + void NotifyEndResult(CoolKeyHandler* context, int operation, int result, int description); ++bool isTokenTypeOtherKnownType(CK_TOKEN_INFO *tokenInfo); + + struct AutoCKYBuffer : public CKYBuffer + { +@@ -2246,6 +2247,7 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co + int isACOOLKey = 0; + int isACAC = 0; + int isAPIV = 0; ++ bool isOtherKey = false; + + int hasApplet = 0; + int isPersonalized = 0; +@@ -2306,6 +2308,12 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co + isAPIV = 1; + } else { + isACOOLKey = 1; ++ isOtherKey = isTokenTypeOtherKnownType(&tokenInfo); ++ if(isOtherKey == true && hasApplet == 0 && isPersonalized == 0) { ++ isACOOLKey = 0; ++ } else { ++ isOtherKey = false; ++ } + } + + // OK, we have everything we need, now build the COOLKEYInfo structure. +@@ -2336,7 +2344,7 @@ CKHGetCoolKeyInfo(PK11SlotInfo *aSlot,Co + tokenInfo.firmwareVersion.major = 1; + } + +- if(isPersonalized == 1 || isACAC == 1 || isAPIV == 1) { ++ if(isPersonalized == 1 || isACAC == 1 || isAPIV == 1 || isOtherKey == true) { + tokenInfo.flags |= CKF_TOKEN_INITIALIZED; + } + +@@ -2407,3 +2415,33 @@ failed: + + return NULL; + } ++ ++bool isTokenTypeOtherKnownType(CK_TOKEN_INFO *tokenInfo) ++{ ++ char tBuff[56]; ++ bool res = false; ++ ++ if(tokenInfo == NULL) { ++ return res; ++ } ++ string curManuCfg; ++ string num; ++ for(int i = 0;;i++) { ++ num = to_string(i); ++ curManuCfg = "esc.token.manu_id." + num; ++ const char *curManu = CoolKeyGetConfig(curManuCfg.c_str()); ++ ++ if(curManu == NULL) { ++ break; ++ } ++ ++ int match = memcmp(tokenInfo->manufacturerID, curManu, strlen(curManu)); ++ CoolKeyFreeConfig(curManu); ++ if(match == 0) { ++ res = true; ++ break; ++ } ++ } ++ PR_LOG( coolKeyLogHN, PR_LOG_DEBUG, ("%s CoolKeyHandler::isTokenTypeOtherKnownType: result: %d .\n",GetTStamp(tBuff,56), res)); ++ return res; ++} diff --git a/SPECS/esc.spec b/SPECS/esc.spec index 8aae04f..d16bf29 100644 --- a/SPECS/esc.spec +++ b/SPECS/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.2 -Release: 22%{?dist} +Release: 24%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -17,6 +17,7 @@ Patch7: esc-1.1.2-fix7.patch Patch8: esc-1.1.2-fix8.patch Patch9: esc-1.1.2-fix9.patch Patch10: esc-1.1.2-fix10.patch +Patch11: esc-1.1.2-fix11.patch #BuildRequires: doxygen fontconfig-devel @@ -87,6 +88,7 @@ cryptographic smartcards. %patch8 -p1 -b .fix8 %patch9 -p1 -b .fix9 %patch10 -p1 -b .fix10 +%patch11 -p1 -b .fix11 %build @@ -155,16 +157,15 @@ cp %{escname}/esc/LICENSE $RPM_BUILD_ROOT/%{docdir} %{_datadir}/%{appdir}/esc.desktop %changelog -* Fri Jul 02 2021 Jack Magne - 1.1.2-22 -- Resolves: rhbz#1972570 - Create explicit pcsc-lite requrement to assure recent pcsc-lite fix [rhel-8.4.0.z], z stream respin. +* Fri Jun 24 2022 Jack Magne - 1.1.2-24 +- Resolves: rhbz#1905691 - Volkswagen Siemens CardOS M4.4 and 5.0 cards display incorrect status in ESC. +* Fri Jul 02 2021 Jack Magne - 1.1.2-23 +- Resolves: rhbz#1970565 - Create explicit pcsc-lite requrement to assure recent pcsc-lite fix [rhel-8.4.0.z], bump release # respin. - Adjust final pcsc-lite package requirement. -* Fri Jun 25 2021 Jack Magne - 1.1.2-20 -- Resolves: rhbz#1972570 - Create explicit pcsc-lite requrement to assure recent pcsc-lite fix [rhel-8.4.0.z], z stream respin. -* Thu Jun 24 2021 Jack Magne - 1.1.2-19 -- Resolves: rhbz#1972570 - Create explicit pcsc-lite requrement to assure recent pcsc-lite fix [rhel-8.4.0.z] -* Tue Mar 30 2021 Jack Magne - 1.1.2-18 -- Related: rhbz#1870715 - HP Keyboard does not list the certificates on an enrolled smart card. -- Re-spin with greater release number, to apease tps tests. +* Fri Jun 25 2021 Jack Magne - 1.1.2-21 +- Resolves: rhbz#1970565 - Create explicit pcsc-lite requrement to assure recent pcsc-lite fix [rhel-8.4.0.z], bump release # respin. +* Thu Jun 24 2021 Jack Magne - 1.1.2-20 +- Resolves: rhbz#1970565 - Create explicit pcsc-lite requrement to assure recent pcsc-lite fix [rhel-8.4.0.z] * Mon Nov 23 2020 Jack Magne - 1.1.2-15 - Resolves: rhbz#1870715 - HP Keyboard does not list the certificates on an enrolled smart card. * Fri Aug 07 2020 Jack Magne - 1.1.2-14