From 8e8df8b196b2e018327ce4bd7d96ba6bfed40f89 Mon Sep 17 00:00:00 2001 From: Robert Relyea Date: Thu, 7 Aug 2025 12:58:21 -0700 Subject: [PATCH] Resolves: RHEL-103370 - 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 b1e0d17..33bd15e 100644 --- a/nss.spec +++ b/nss.spec @@ -1,6 +1,6 @@ %global nss_version 3.112.0 %global nspr_version 4.36.0 -%global baserelease 3 +%global baserelease 4 %global nss_release %baserelease # NOTE: To avoid NVR clashes of nspr* packages: # use "%%global nspr_release %%[%%baserelease+n]" to handle offsets when @@ -189,6 +189,7 @@ Patch94: nss-3.112-add-ml-dsa-gtests-dsa.patch Patch95: nss-3.112-add-ml-dsa-ssl-support-dsa.patch Patch96: nss-3.112-fips-and-fixes.patch Patch97: nss-3.112-big-endian-compression-fix.patch +patch98: nss-3.112-fix-get-interface.patch Patch100: nspr-config-pc.patch Patch101: nspr-gcc-atomics.patch @@ -1195,6 +1196,9 @@ update-crypto-policies &> /dev/null || : %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