From 5ae6003f38cb936648abe8233a37032e11e06d53 Mon Sep 17 00:00:00 2001 From: Robert Relyea Date: Thu, 7 Aug 2025 12:56:00 -0700 Subject: [PATCH] Resolves: RHEL-103353 - fix interface issue when pulling 3.0 pkcs#11 interfaces explicitly --- nss-3.112-fix-get-interface.patch | 44 +++++++++++++++++++++++++++++++ nss.spec | 6 ++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 nss-3.112-fix-get-interface.patch diff --git a/nss-3.112-fix-get-interface.patch b/nss-3.112-fix-get-interface.patch new file mode 100644 index 0000000..3d8e95e --- /dev/null +++ b/nss-3.112-fix-get-interface.patch @@ -0,0 +1,44 @@ +diff --git a/lib/softoken/fipstokn.c b/lib/softoken/fipstokn.c +--- a/lib/softoken/fipstokn.c ++++ b/lib/softoken/fipstokn.c +@@ -244,17 +244,17 @@ fc_getAttribute(CK_ATTRIBUTE_PTR pTempla + + #define CK_PKCS11_FUNCTION_INFO(name) CK_RV __PASTE(F, name) + #define CK_NEED_ARG_LIST 1 + + #include "pkcs11f.h" + + /* ------------- build the CK_CRYPTO_TABLE ------------------------- */ + static CK_FUNCTION_LIST_3_0 sftk_fipsTable = { +- { CRYPTOKI_VERSION_MAJOR, CRYPTOKI_VERSION_MINOR }, ++ { 3, 0 }, + + #undef CK_NEED_ARG_LIST + #undef CK_PKCS11_FUNCTION_INFO + + #define CK_PKCS11_FUNCTION_INFO(name) \ + __PASTE(F, name) \ + , + +diff --git a/lib/softoken/pkcs11.c b/lib/softoken/pkcs11.c +--- a/lib/softoken/pkcs11.c ++++ b/lib/softoken/pkcs11.c +@@ -107,17 +107,17 @@ static PRIntervalTime loginWaitTime; + #define CK_PKCS11_FUNCTION_INFO(name) CK_RV __PASTE(F, name) + #define CK_NEED_ARG_LIST 1 + + #include "pkcs11f.h" + #endif + + /* build the crypto module table */ + static CK_FUNCTION_LIST_3_0 sftk_funcList = { +- { CRYPTOKI_VERSION_MAJOR, CRYPTOKI_VERSION_MINOR }, ++ { 3, 0 }, + + #undef CK_PKCS11_FUNCTION_INFO + #undef CK_NEED_ARG_LIST + + #define CK_PKCS11_FUNCTION_INFO(func) \ + __PASTE(NS, func) \ + , + #include "pkcs11f.h" diff --git a/nss.spec b/nss.spec index f8e12ec..9f2f9a8 100644 --- a/nss.spec +++ b/nss.spec @@ -3,7 +3,7 @@ # NOTE: To avoid NVR clashes of nspr* packages: # - reset %%{nspr_release} to 1, when updating %%{nspr_version} # - increment %%{nspr_version}, when updating the NSS part only -%global baserelease 3 +%global baserelease 4 %global nss_release %baserelease # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when # release number between nss and nspr are different. @@ -180,6 +180,7 @@ Patch94: nss-3.112-add-ml-dsa-gtests.patch Patch95: nss-3.112-add-ml-dsa-ssl-support.patch Patch96: nss-3.112-fips-and-fixes-el10.patch Patch97: nss-3.112-big-endian-compression-fix.patch +Patch98: nss-3.112-fix-get-interface.patch # NSS reverse patches Patch300: nss-3.79-distrusted-certs.patch @@ -1163,6 +1164,9 @@ fi %changelog +* Thu Aug 7 2025 Bob Relyea - 3.112.0-4 +- fix interface issue when pulling 3.0 pkcs#11 interfaces explicitly + * Fri Aug 1 2025 Bob Relyea - 3.112.0-3 - restore CONCATENATE functions accidentally remvoed in the last patch - fix big endian issue in tstclnt and selfserv in certificate compression