linux-sgx/0127-PCS-Client-Tool-Migrate-from-deprecated-pkg_resource.patch
Daniel P. Berrangé 7ec194d0a3 Fix pccs npm security flaws
Sync patches from Fedora 43, to fix multiple pccs npm security flaws,
and fix typo in pccsadmin help text.

CVE-2026-23745, CVE-2026-23950, CVE-2026-24842, CVE-2025-13465, CVE-2025-15284

Resolves: RHEL-142527, RHEL-145054, RHEL-144307, RHEL-138123, RHEL-140109
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-05 09:41:34 +00:00

52 lines
1.7 KiB
Diff

From f0222324f5896d08457ed0ffb3951081d66e0cf0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Tue, 6 Jan 2026 18:03:36 +0100
Subject: [PATCH 127/136] [PCS Client Tool] Migrate from deprecated
pkg_resources to packaging
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Miro Hrončok <miro@hroncok.cz>
Version 14.0 is the first version that had the Version class.
Ref: https://setuptools.pypa.io/en/latest/pkg_resources.html
Signed-off-by: Miro Hrončok <miro@hroncok.cz>
---
tools/PccsAdminTool/lib/intelsgx/pcs.py | 2 +-
tools/PccsAdminTool/requirements.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/PccsAdminTool/lib/intelsgx/pcs.py b/tools/PccsAdminTool/lib/intelsgx/pcs.py
index dd4eba40..7596708c 100644
--- a/tools/PccsAdminTool/lib/intelsgx/pcs.py
+++ b/tools/PccsAdminTool/lib/intelsgx/pcs.py
@@ -39,7 +39,7 @@ if system() == 'Windows':
from lib.intelsgx.credential import Credentials
from requests.adapters import HTTPAdapter
from urllib3.util import Retry
-from pkg_resources import parse_version
+from packaging.version import Version as parse_version
certBegin= '-----BEGIN CERTIFICATE-----'
certEnd= '-----END CERTIFICATE-----'
diff --git a/tools/PccsAdminTool/requirements.txt b/tools/PccsAdminTool/requirements.txt
index 8a73667f..65f6bf50 100644
--- a/tools/PccsAdminTool/requirements.txt
+++ b/tools/PccsAdminTool/requirements.txt
@@ -1,8 +1,8 @@
asn1>=2.4.1
cryptography>=41.0.7
keyring>=23.0.0
+packaging>=14.0
pyOpenSSL>=23.2.0,<24.3.0
pypac>=0.14.0
Requests>=2.31.0
-setuptools>=65.5.1
urllib3>=1.26.18
--
2.52.0