From 9930d3512987cd2c76b9937dc50acaec5335a7d9 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Fri, 11 Nov 2022 23:33:15 +0100 Subject: [PATCH] nss_latest: 3.84 -> 3.85 https://github.com/nss-dev/nss/blob/master/doc/rst/releases/nss_3_85.rst --- ...ity_load.patch => 85_security_load_3.85+.patch} | 14 +++++++------- pkgs/development/libraries/nss/generic.nix | 6 +++--- pkgs/development/libraries/nss/latest.nix | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) rename pkgs/development/libraries/nss/{85_security_load.patch => 85_security_load_3.85+.patch} (91%) diff --git a/pkgs/development/libraries/nss/85_security_load.patch b/pkgs/development/libraries/nss/85_security_load_3.85+.patch similarity index 91% rename from pkgs/development/libraries/nss/85_security_load.patch rename to pkgs/development/libraries/nss/85_security_load_3.85+.patch index 2b2cce465ba7..bc3f48e66744 100644 --- a/pkgs/development/libraries/nss/85_security_load.patch +++ b/pkgs/development/libraries/nss/85_security_load_3.85+.patch @@ -12,13 +12,13 @@ index ad8f3b84e..74676d039 100644 if (!lib) { PR_fprintf(PR_STDERR, "loading softokn3 failed"); diff --git nss/lib/pk11wrap/pk11load.c nss/lib/pk11wrap/pk11load.c -index 9e7a0a546..a0a23a1a4 100644 +index 119c8c512..720d39ccc 100644 --- nss/lib/pk11wrap/pk11load.c +++ nss/lib/pk11wrap/pk11load.c -@@ -466,6 +466,15 @@ secmod_LoadPKCS11Module(SECMODModule *mod, SECMODModule **oldModule) - * unload the library if anything goes wrong from here on out... - */ +@@ -486,6 +486,15 @@ secmod_LoadPKCS11Module(SECMODModule *mod, SECMODModule **oldModule) + #else library = PR_LoadLibrary(mod->dllName); + #endif // defined(_WIN32) +#ifndef NSS_STATIC_SOFTOKEN + if ((library == NULL) && + !rindex(mod->dllName, PR_GetDirectorySeparator())) { @@ -32,7 +32,7 @@ index 9e7a0a546..a0a23a1a4 100644 if (library == NULL) { diff --git nss/lib/util/secload.c nss/lib/util/secload.c -index 12efd2f75..8b74478f6 100644 +index 1cebae4e2..9194bb761 100644 --- nss/lib/util/secload.c +++ nss/lib/util/secload.c @@ -70,9 +70,14 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name) @@ -66,8 +66,8 @@ index 12efd2f75..8b74478f6 100644 @@ -89,6 +99,10 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name) | PR_LD_ALT_SEARCH_PATH #endif - ); -+ if (! dlh) { + ); ++ if (!dlh) { + strcpy(fullName + referencePathSize, name); + dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL); + } diff --git a/pkgs/development/libraries/nss/generic.nix b/pkgs/development/libraries/nss/generic.nix index e6d2eae2449c..a2e44f40227f 100644 --- a/pkgs/development/libraries/nss/generic.nix +++ b/pkgs/development/libraries/nss/generic.nix @@ -41,10 +41,10 @@ stdenv.mkDerivation rec { patches = [ # Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch - (if (lib.versionOlder version "3.77") then - ./85_security_load.patch - else + (if (lib.versionOlder version "3.84") then ./85_security_load_3.77+.patch + else + ./85_security_load_3.85+.patch ) ./fix-cross-compilation.patch ]; diff --git a/pkgs/development/libraries/nss/latest.nix b/pkgs/development/libraries/nss/latest.nix index 09eaa64e600a..56d6c0e47103 100644 --- a/pkgs/development/libraries/nss/latest.nix +++ b/pkgs/development/libraries/nss/latest.nix @@ -5,6 +5,6 @@ # Example: nix-shell ./maintainers/scripts/update.nix --argstr package cacert import ./generic.nix { - version = "3.84"; - hash = "sha256-mjh//jUP8U8AHZQ/lswMBkiRVR1x4al6Xdv/5/EgeiU="; + version = "3.85"; + hash = "sha256-r9nWRRCxFU3rvWyrNXHp/2SjNziY4DSD5Mhc2toT0pc="; }