Compare commits

...

No commits in common. "c8" and "imports/c8-beta/esc-1.1.2-23.el8" have entirely different histories.

2 changed files with 1 additions and 109 deletions

View File

@ -1,104 +0,0 @@
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;
+}

View File

@ -1,6 +1,6 @@
Name: esc Name: esc
Version: 1.1.2 Version: 1.1.2
Release: 24%{?dist} Release: 23%{?dist}
Summary: Enterprise Security Client Smart Card Client Summary: Enterprise Security Client Smart Card Client
License: GPL+ License: GPL+
URL: http://directory.fedora.redhat.com/wiki/CoolKey URL: http://directory.fedora.redhat.com/wiki/CoolKey
@ -17,7 +17,6 @@ Patch7: esc-1.1.2-fix7.patch
Patch8: esc-1.1.2-fix8.patch Patch8: esc-1.1.2-fix8.patch
Patch9: esc-1.1.2-fix9.patch Patch9: esc-1.1.2-fix9.patch
Patch10: esc-1.1.2-fix10.patch Patch10: esc-1.1.2-fix10.patch
Patch11: esc-1.1.2-fix11.patch
#BuildRequires: doxygen fontconfig-devel #BuildRequires: doxygen fontconfig-devel
@ -88,7 +87,6 @@ cryptographic smartcards.
%patch8 -p1 -b .fix8 %patch8 -p1 -b .fix8
%patch9 -p1 -b .fix9 %patch9 -p1 -b .fix9
%patch10 -p1 -b .fix10 %patch10 -p1 -b .fix10
%patch11 -p1 -b .fix11
%build %build
@ -157,8 +155,6 @@ cp %{escname}/esc/LICENSE $RPM_BUILD_ROOT/%{docdir}
%{_datadir}/%{appdir}/esc.desktop %{_datadir}/%{appdir}/esc.desktop
%changelog %changelog
* Fri Jun 24 2022 Jack Magne <jmagne@redhat.com> - 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 <jmagne@redhat.com> - 1.1.2-23 * Fri Jul 02 2021 Jack Magne <jmagne@redhat.com> - 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. - 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. - Adjust final pcsc-lite package requirement.