comphelper/source/misc/hash.cxx                           |   16 
 download.lst                                              |    4 
 external/nss/ExternalProject_nss.mk                       |    2 
 external/nss/UnpackedTarball_nss.mk                       |    5 
 external/nss/Wincompatible-function-pointer-types.patch.0 |  419 ++++++--------
 external/nss/clang-cl.patch.0                             |   11 
 external/nss/macos-dlopen.patch.0                         |   18 
 external/nss/nspr-win95-target.patch                      |   11 
 external/nss/nss-android.patch.1                          |    6 
 external/nss/nss.aix.patch                                |  140 ----
 external/nss/nss.cygwin64.in32bit.patch                   |   14 
 external/nss/nss.patch                                    |   16 
 external/nss/nss_macosx.patch                             |   10 
 external/nss/winnt.patch.0                                |   10 
 external/zlib/StaticLibrary_zlib.mk                       |    1 
 include/comphelper/hash.hxx                               |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                         |    6 
 17 files changed, 275 insertions(+), 416 deletions(-)

New commits:
commit bf2eabd893275b7afc2386d7c1d2c775733bd9be
Author:     Xisco Fauli <[email protected]>
AuthorDate: Thu Jul 31 17:13:05 2025 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 20:46:07 2025 +0100

    nss: upgrade to 3.114
    
    Downloaded from 
https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_114_RTM/src/nss-3.114-with-nspr-4.37.tar.gz
    
    Change-Id: Id3c3d002790d92ca8f17c676ce447dae8c26e16b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188688
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 6cda2dbfbf5d855e6194cd530a6f66099279bd90)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193493
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 7151002bdb2a5f31ba0eae3a98c8a74b93d1df10)

diff --git a/download.lst b/download.lst
index 86baf9ca7820..d0cc9b497b6f 100644
--- a/download.lst
+++ b/download.lst
@@ -409,8 +409,8 @@ NEON_TARBALL := neon-0.30.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-NSS_SHA256SUM := 
ae99a9a473f8117f542dfb33daa26a584db21776ef053b48cd24fa7b9d802dc7
-NSS_TARBALL := nss-3.113.1-with-nspr-4.36.tar.gz
+NSS_SHA256SUM := 
aa927a8610354483b52fdb3c9445f3e2f4a231cc03754ed47e96d2697c2e2329
+NSS_TARBALL := nss-3.114-with-nspr-4.37.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
commit 7cca5d86b2e14e39f2c4d8deaf0661480ba85d49
Author:     Xisco Fauli <[email protected]>
AuthorDate: Wed Jul 2 09:59:50 2025 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 20:45:32 2025 +0100

    nss: upgrade to 3.113.1
    
    Downloaded from 
https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_113_1_RTM/src/nss-3.113.1-with-nspr-4.36.tar.gz
    
    Change-Id: Ib5aed4732e2e4b98d6a3514a25b63a5eb32d8bf1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187265
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 7ff0fd67cfe5514094249f2f5580ea38a8619357)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193492
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit e996185cfe7c1f10c6f09cb5b79a7a3af693697a)

diff --git a/download.lst b/download.lst
index 3a02f52fb2c6..86baf9ca7820 100644
--- a/download.lst
+++ b/download.lst
@@ -409,8 +409,8 @@ NEON_TARBALL := neon-0.30.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-NSS_SHA256SUM := 
b62d51d900b59502eea34be33e3089537fb73977ea6b76cea8d8e6a80e1d95df
-NSS_TARBALL := nss-3.113-with-nspr-4.36.tar.gz
+NSS_SHA256SUM := 
ae99a9a473f8117f542dfb33daa26a584db21776ef053b48cd24fa7b9d802dc7
+NSS_TARBALL := nss-3.113.1-with-nspr-4.36.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
commit 5dc1d3bcbf7f8d9631af96c7c31541a5dc3d5967
Author:     Xisco Fauli <[email protected]>
AuthorDate: Fri Jun 20 09:13:51 2025 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 20:42:42 2025 +0100

    nss: upgrade to 3.113
    
    Downloaded from 
https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_113_RTM/src/nss-3.113-with-nspr-4.36.tar.gz
    
    Change-Id: I9327a325fc2bdc1159c9dda1c8e54963b410e8e3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186735
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit d6efc1cd776393fc70a8dc0e2e1d6dc26df38035)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193491
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit c1019e992b503bc29c64e507d24d534336ffe2cc)

diff --git a/download.lst b/download.lst
index b8abcb19da02..3a02f52fb2c6 100644
--- a/download.lst
+++ b/download.lst
@@ -409,8 +409,8 @@ NEON_TARBALL := neon-0.30.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-NSS_SHA256SUM := 
a8ee2b4485c4d841b1f974a13037183071ac12520512e6ec6b7d38ff36e8a125
-NSS_TARBALL := nss-3.112-with-nspr-4.36.tar.gz
+NSS_SHA256SUM := 
b62d51d900b59502eea34be33e3089537fb73977ea6b76cea8d8e6a80e1d95df
+NSS_TARBALL := nss-3.113-with-nspr-4.36.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/nss/clang-cl.patch.0 b/external/nss/clang-cl.patch.0
index 04e21e7003d0..d86e49b43458 100644
--- a/external/nss/clang-cl.patch.0
+++ b/external/nss/clang-cl.patch.0
@@ -61,17 +61,6 @@
  #pragma deprecated(CERTDB_VALID_PEER)
  #endif
  #define CERTDB_VALID_PEER CERTDB_TERMINAL_RECORD
---- nss/lib/util/pkcs11n.h
-+++ nss/lib/util/pkcs11n.h
-@@ -563,7 +563,7 @@
- /* keep the old value for compatibility reasons*/
- #define CKT_NSS_MUST_VERIFY ((__CKT_NSS_MUST_VERIFY)(CKT_NSS + 4))
- #else
--#ifdef _WIN32
-+#if defined _WIN32 && !defined __clang__
- /* This magic gets the windows compiler to give us a deprecation
-  * warning */
- #pragma deprecated(CKT_NSS_UNTRUSTED, CKT_NSS_MUST_VERIFY, CKT_NSS_VALID)
 
 # While MSVC uses
 #  #pragma warning(disable : 4103)
commit 234207649ffa0203d9ce3c442f473c8d69b9b4bf
Author:     Xisco Fauli <[email protected]>
AuthorDate: Tue May 27 18:25:02 2025 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 20:33:19 2025 +0100

    nss: upgrade to 3.112
    
    Downloaded 
https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_112_RTM/src/nss-3.112-with-nspr-4.36.tar.gz
    
    Change-Id: I755d5e89868870237ba3f7d04a9ec23e11fbba04
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185928
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 95b9691da797bc5bef17ce67dcfe69766ccf95ba)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193490
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit b06f330b68068216053bc13b8183bc334cc19d52)

diff --git a/download.lst b/download.lst
index 148e25608b16..b8abcb19da02 100644
--- a/download.lst
+++ b/download.lst
@@ -409,8 +409,8 @@ NEON_TARBALL := neon-0.30.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-NSS_SHA256SUM := 
672f0af6cc9b577bee4906e2071b250d940b23e29ce516a721dc9561c421bbce
-NSS_TARBALL := nss-3.111-with-nspr-4.36.tar.gz
+NSS_SHA256SUM := 
a8ee2b4485c4d841b1f974a13037183071ac12520512e6ec6b7d38ff36e8a125
+NSS_TARBALL := nss-3.112-with-nspr-4.36.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
commit 80066fefe09d458200e7972a26385d67a4585029
Author:     Xisco Fauli <[email protected]>
AuthorDate: Mon May 5 12:18:01 2025 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 20:31:22 2025 +0100

    nss: upgrade to 3.111
    
    Downloaded 
https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_111_RTM/src/nss-3.111-with-nspr-4.36.tar.gz
    
    Change-Id: If08f3f13f590a8e17a64f97990a4aced9900dd62
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184959
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit fe2af71719fa335ad232902451ffb8e6e666c7f7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193489
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    (cherry picked from commit 9c7aea7512ded25539c93b2b6469b8ad899a99b6)

diff --git a/download.lst b/download.lst
index c57fcf26cce8..148e25608b16 100644
--- a/download.lst
+++ b/download.lst
@@ -409,8 +409,8 @@ NEON_TARBALL := neon-0.30.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-NSS_SHA256SUM := 
96114bef9e9692dda6e7793da26fedef0dc0449c3644ebe1122464e599a39dc0
-NSS_TARBALL := nss-3.110-with-nspr-4.36.tar.gz
+NSS_SHA256SUM := 
672f0af6cc9b577bee4906e2071b250d940b23e29ce516a721dc9561c421bbce
+NSS_TARBALL := nss-3.111-with-nspr-4.36.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
commit 52f1db7b0d2b74fc702ba7a6b167816b547c3343
Author:     Xisco Fauli <[email protected]>
AuthorDate: Mon Mar 31 10:18:11 2025 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 20:29:19 2025 +0100

    nss: upgrade to 3.110
    
    Downloaded from 
https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_110_RTM/src/nss-3.110-with-nspr-4.36.tar.gz
    
    Change-Id: I4301e093661bbac3aae9f59d7ae366a0b2e2ef9b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183526
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 969d6815b802893b5dd765afc17ad230af0fe456)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193488
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    (cherry picked from commit 0793b0911f303ad7fcb240d2d12b53c95b7fdd91)

diff --git a/download.lst b/download.lst
index 5fe16541a3d7..c57fcf26cce8 100644
--- a/download.lst
+++ b/download.lst
@@ -409,8 +409,8 @@ NEON_TARBALL := neon-0.30.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-NSS_SHA256SUM := 
25be414ff9c207dd67355f19e9e71001db45957b6bb74adf5b094c92e05116b4
-NSS_TARBALL := nss-3.109-with-nspr-4.36.tar.gz
+NSS_SHA256SUM := 
96114bef9e9692dda6e7793da26fedef0dc0449c3644ebe1122464e599a39dc0
+NSS_TARBALL := nss-3.110-with-nspr-4.36.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
commit 2f99fe58c2ffd77bc037db2e56bd7b5d9fdb8112
Author:     Xisco Fauli <[email protected]>
AuthorDate: Mon Feb 17 12:06:37 2025 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 20:25:28 2025 +0100

    nss: upgrade to 3.109
    
    Downloaded from 
https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_109_RTM/src/nss-3.109-with-nspr-4.36.tar.gz
    
    Change-Id: I2210c384f629ccc9a671c2bb3260b822a302dd1d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181773
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit e39a1baeb4441e1736022a7fd07668bd5db2cb6e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193487
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 0c69f658e61880ffbde9a547c3ba25947583cda8)

diff --git a/download.lst b/download.lst
index 54cfe13c01ef..5fe16541a3d7 100644
--- a/download.lst
+++ b/download.lst
@@ -409,8 +409,8 @@ NEON_TARBALL := neon-0.30.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-NSS_SHA256SUM := 
0ea8bab27345e4e0fc0ec0587d01bb54ba7eb46cb5b369c9ed59ee42baa78fa9
-NSS_TARBALL := nss-3.104-with-nspr-4.35.tar.gz
+NSS_SHA256SUM := 
25be414ff9c207dd67355f19e9e71001db45957b6bb74adf5b094c92e05116b4
+NSS_TARBALL := nss-3.109-with-nspr-4.36.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/nss/Wincompatible-function-pointer-types.patch.0 
b/external/nss/Wincompatible-function-pointer-types.patch.0
index 1e9b7550e1da..dde8c21348cf 100644
--- a/external/nss/Wincompatible-function-pointer-types.patch.0
+++ b/external/nss/Wincompatible-function-pointer-types.patch.0
@@ -1,234 +1,215 @@
 --- nspr/pr/tests/testfile.c
 +++ nspr/pr/tests/testfile.c
-@@ -86,7 +86,7 @@
+@@ -72,7 +72,7 @@
  #endif
- #define TMPDIR_LEN  64
+ #define TMPDIR_LEN 64
  char testdir[TMPDIR_LEN];
--static PRInt32 PR_CALLBACK DirTest(void *argunused);
-+static void PR_CALLBACK DirTest(void *argunused);
+-static PRInt32 PR_CALLBACK DirTest(void* argunused);
++static void PR_CALLBACK DirTest(void* argunused);
  PRInt32 dirtest_failed = 0;
  
- PRThread* create_new_thread(PRThreadType type,
-@@ -123,7 +123,7 @@
-     if (native_thread) {
  #if defined(_PR_PTHREADS)
-         pthread_t tid;
--        if (!pthread_create(&tid, NULL, start, arg)) {
-+        if (!pthread_create(&tid, NULL, (void *(*)(void *))start, arg)) {
-             return((PRThread *) tid);
-         }
-         else {
-@@ -594,7 +594,7 @@
-     return 0;
+@@ -134,7 +134,7 @@
+   if (native_thread) {
+ #  if defined(_PR_PTHREADS)
+     pthread_t tid;
+-    if (!pthread_create(&tid, NULL, nativeStart, arg)) {
++    if (!pthread_create(&tid, NULL, (void *(*)(void *))nativeStart, arg)) {
+       return ((PRThread*)tid);
+     } else {
+       return (NULL);
+@@ -595,7 +595,7 @@
+   return 0;
  }
  
--static PRInt32 PR_CALLBACK DirTest(void *arg)
-+static void PR_CALLBACK DirTest(void *arg)
- {
-     struct dirtest_arg *tinfo = (struct dirtest_arg *) arg;
-     PRFileDesc *fd_file;
-@@ -618,14 +618,14 @@
-         printf(
-             "testfile failed to create dir %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
-     fd_dir = PR_OpenDir(TEST_DIR);
-     if (fd_dir == NULL) {
-         printf(
-             "testfile failed to open dirctory %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
- 
-     strcpy(pathname, TEST_DIR);
-@@ -645,7 +645,7 @@
-             printf(
-                 "testfile failed to create/open file %s [%d, %d]
",
-                 pathname, PR_GetError(), PR_GetOSError());
--            return -1;
-+            return;
-         }
-         PR_Close(fd_file);
-     }
-@@ -664,7 +664,7 @@
-         printf(
-             "testfile failed to create/open hidden file %s [%d, %d]
",
-             pathname, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
- 
-     PR_Close(fd_file);
-@@ -681,7 +681,7 @@
-     if (hfile == INVALID_HANDLE_VALUE) {
-         printf("testfile failed to create/open hidden file %s [0, %d]
",
-                pathname, GetLastError());
--        return -1;
-+        return;
-     }
-     CloseHandle(hfile);
- 
-@@ -696,7 +696,7 @@
-     if (hfile == INVALID_HANDLE_VALUE) {
-         printf("testfile failed to create/open hidden file %s [0, %d]
",
-                pathname, GetLastError());
--        return -1;
-+        return;
-     }
-     CloseHandle(hfile);
- 
-@@ -707,7 +707,7 @@
+-static PRInt32 PR_CALLBACK DirTest(void* arg) {
++static void PR_CALLBACK DirTest(void* arg) {
+   struct dirtest_arg* tinfo = (struct dirtest_arg*)arg;
+   PRFileDesc* fd_file;
+   PRDir* fd_dir;
+@@ -617,13 +617,13 @@
+   if ((PR_MkDir(TEST_DIR, 0777)) < 0) {
+     printf("testfile failed to create dir %s [%d, %d]
", TEST_DIR,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+   fd_dir = PR_OpenDir(TEST_DIR);
+   if (fd_dir == NULL) {
+     printf("testfile failed to open dirctory %s [%d, %d]
", TEST_DIR,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+ 
+   strcpy(pathname, TEST_DIR);
+@@ -641,7 +641,7 @@
      if (fd_file == NULL) {
-         printf("testfile failed to create/open hidden file %s [%d, %d]
",
-                pathname, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
+       printf("testfile failed to create/open file %s [%d, %d]
", pathname,
+              PR_GetError(), PR_GetOSError());
+-      return -1;
++      return;
      }
      PR_Close(fd_file);
- #endif  /* XP_UNIX */
-@@ -720,14 +720,14 @@
-         printf(
-             "testfile failed to close dirctory %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
-     fd_dir = PR_OpenDir(TEST_DIR);
-     if (fd_dir == NULL) {
-         printf(
-             "testfile failed to reopen dirctory %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
- 
-     /*
-@@ -750,14 +750,14 @@
-             printf(
-                 "testfile failed to GetFileInfo file %s [%d, %d]
",
-                 pathname, PR_GetError(), PR_GetOSError());
--            return -1;
-+            return;
-         }
- 
-         if (info.type != PR_FILE_FILE) {
-             printf(
-                 "testfile incorrect fileinfo for file %s [%d, %d]
",
-                 pathname, PR_GetError(), PR_GetOSError());
--            return -1;
-+            return;
-         }
-     }
-     if (num_files != 0)
-@@ -765,7 +765,7 @@
-         printf(
-             "testfile failed to find all files in directory %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
- 
-     PR_CloseDir(fd_dir);
-@@ -781,7 +781,7 @@
-         printf(
-             "testfile failed to reopen dirctory %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
- 
-     DPRINTF(("Listing non-hidden files in directory %s
",TEST_DIR));
-@@ -789,7 +789,7 @@
-         DPRINTF(("    %s
",dirEntry->name));
-         if (!strcmp(HIDDEN_FILE_NAME, dirEntry->name)) {
-             printf("testfile found hidden file %s
", pathname);
--            return -1;
-+            return;
-         }
- 
-     }
-@@ -803,7 +803,7 @@
-         printf(
-             "testfile failed to delete hidden file %s [%d, %d]
",
-             pathname, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
- 
-     PR_CloseDir(fd_dir);
-@@ -815,41 +815,41 @@
-         printf(
-             "testfile failed to rename directory %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
- 
-     if (PR_FAILURE == PR_MkDir(TEST_DIR, 0777)) {
-         printf(
-             "testfile failed to recreate dir %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
-     if (PR_SUCCESS == PR_Rename(renamename, TEST_DIR)) {
-         printf(
-             "testfile renamed directory to existing name %s
",
-             renamename);
--        return -1;
-+        return;
-     }
- 
-     if (PR_FAILURE == PR_RmDir(TEST_DIR)) {
-         printf(
-             "testfile failed to rmdir %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
- 
-     if (PR_FAILURE == PR_Rename(renamename, TEST_DIR)) {
-         printf(
-             "testfile failed to rename directory %s [%d, %d]
",
-             renamename, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
-     fd_dir = PR_OpenDir(TEST_DIR);
-     if (fd_dir == NULL) {
-         printf(
-             "testfile failed to reopen directory %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
- 
-     strcpy(pathname, TEST_DIR);
-@@ -865,7 +865,7 @@
-             printf(
-                 "testfile failed to delete file %s [%d, %d]
",
-                 pathname, PR_GetError(), PR_GetOSError());
--            return -1;
-+            return;
-         }
-     }
- 
-@@ -875,14 +875,13 @@
-         printf(
-             "testfile failed to rmdir %s [%d, %d]
",
-             TEST_DIR, PR_GetError(), PR_GetOSError());
--        return -1;
-+        return;
-     }
-     PR_EnterMonitor(tinfo->mon);
-     tinfo->done = 1;
-     PR_Notify(tinfo->mon);
-     PR_ExitMonitor(tinfo->mon);
- 
--    return 0;
+   }
+@@ -659,7 +659,7 @@
+   if (fd_file == NULL) {
+     printf("testfile failed to create/open hidden file %s [%d, %d]
", pathname,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+ 
+   PR_Close(fd_file);
+@@ -673,7 +673,7 @@
+   if (hfile == INVALID_HANDLE_VALUE) {
+     printf("testfile failed to create/open hidden file %s [0, %d]
", pathname,
+            GetLastError());
+-    return -1;
++    return;
+   }
+   CloseHandle(hfile);
+ 
+@@ -684,7 +684,7 @@
+   if (hfile == INVALID_HANDLE_VALUE) {
+     printf("testfile failed to create/open hidden file %s [0, %d]
", pathname,
+            GetLastError());
+-    return -1;
++    return;
+   }
+   CloseHandle(hfile);
+ 
+@@ -695,13 +695,13 @@
+   if (PR_FAILURE == PR_CloseDir(fd_dir)) {
+     printf("testfile failed to close dirctory %s [%d, %d]
", TEST_DIR,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+   fd_dir = PR_OpenDir(TEST_DIR);
+   if (fd_dir == NULL) {
+     printf("testfile failed to reopen dirctory %s [%d, %d]
", TEST_DIR,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+ 
+   /*
+@@ -723,19 +723,19 @@
+     if ((PR_GetFileInfo(pathname, &info)) < 0) {
+       printf("testfile failed to GetFileInfo file %s [%d, %d]
", pathname,
+              PR_GetError(), PR_GetOSError());
+-      return -1;
++      return;
+     }
+ 
+     if (info.type != PR_FILE_FILE) {
+       printf("testfile incorrect fileinfo for file %s [%d, %d]
", pathname,
+              PR_GetError(), PR_GetOSError());
+-      return -1;
++      return;
+     }
+   }
+   if (num_files != 0) {
+     printf("testfile failed to find all files in directory %s [%d, %d]
",
+            TEST_DIR, PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+ 
+   PR_CloseDir(fd_dir);
+@@ -750,7 +750,7 @@
+   if (fd_dir == NULL) {
+     printf("testfile failed to reopen dirctory %s [%d, %d]
", TEST_DIR,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+ 
+   DPRINTF(("Listing non-hidden files in directory %s
", TEST_DIR));
+@@ -758,7 +758,7 @@
+     DPRINTF(("        %s
", dirEntry->name));
+     if (!strcmp(HIDDEN_FILE_NAME, dirEntry->name)) {
+       printf("testfile found hidden file %s
", pathname);
+-      return -1;
++      return;
+     }
+   }
+   /*
+@@ -770,7 +770,7 @@
+   if (PR_FAILURE == PR_Delete(pathname)) {
+     printf("testfile failed to delete hidden file %s [%d, %d]
", pathname,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+ 
+   PR_CloseDir(fd_dir);
+@@ -781,35 +781,35 @@
+   if (PR_FAILURE == PR_Rename(TEST_DIR, renamename)) {
+     printf("testfile failed to rename directory %s [%d, %d]
", TEST_DIR,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+ 
+   if (PR_FAILURE == PR_MkDir(TEST_DIR, 0777)) {
+     printf("testfile failed to recreate dir %s [%d, %d]
", TEST_DIR,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+   if (PR_SUCCESS == PR_Rename(renamename, TEST_DIR)) {
+     printf("testfile renamed directory to existing name %s
", renamename);
+-    return -1;
++    return;
+   }
+ 
+   if (PR_FAILURE == PR_RmDir(TEST_DIR)) {
+     printf("testfile failed to rmdir %s [%d, %d]
", TEST_DIR, PR_GetError(),
+            PR_GetOSError());
+-    return -1;
++    return;
+   }
+ 
+   if (PR_FAILURE == PR_Rename(renamename, TEST_DIR)) {
+     printf("testfile failed to rename directory %s [%d, %d]
", renamename,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+   fd_dir = PR_OpenDir(TEST_DIR);
+   if (fd_dir == NULL) {
+     printf("testfile failed to reopen directory %s [%d, %d]
", TEST_DIR,
+            PR_GetError(), PR_GetOSError());
+-    return -1;
++    return;
+   }
+ 
+   strcpy(pathname, TEST_DIR);
+@@ -823,7 +823,7 @@
+     if (PR_FAILURE == PR_Delete(pathname)) {
+       printf("testfile failed to delete file %s [%d, %d]
", pathname,
+              PR_GetError(), PR_GetOSError());
+-      return -1;
++      return;
+     }
+   }
+ 
+@@ -832,14 +832,13 @@
+   if (PR_FAILURE == PR_RmDir(TEST_DIR)) {
+     printf("testfile failed to rmdir %s [%d, %d]
", TEST_DIR, PR_GetError(),
+            PR_GetOSError());
+-    return -1;
++    return;
+   }
+   PR_EnterMonitor(tinfo->mon);
+   tinfo->done = 1;
+   PR_Notify(tinfo->mon);
+   PR_ExitMonitor(tinfo->mon);
+ 
+-  return 0;
  }
  /************************************************************************/
+
  
diff --git a/external/nss/macos-dlopen.patch.0 
b/external/nss/macos-dlopen.patch.0
index e8abc8f59c69..e8eacd8903f9 100644
--- a/external/nss/macos-dlopen.patch.0
+++ b/external/nss/macos-dlopen.patch.0
@@ -1,14 +1,14 @@
 --- nspr/pr/src/linking/prlink.c
 +++ nspr/pr/src/linking/prlink.c
-@@ -555,7 +555,7 @@
-          * The reason is that DARWIN's dlopen ignores the provided path
-          * and checks for the plain filename in DYLD_LIBRARY_PATH,
-          * which could load an unexpected version of a library. */
--        if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL) {
-+        if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL || strncmp(name, 
"@loader_path/", 13) == 0) {
-           /* no slash, allow to load from any location */
-           okToLoad = PR_TRUE;
-         } else {
+@@ -502,7 +502,7 @@
+      * The reason is that DARWIN's dlopen ignores the provided path
+      * and checks for the plain filename in DYLD_LIBRARY_PATH,
+      * which could load an unexpected version of a library. */
+-    if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL) {
++    if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL || strncmp(name, 
"@loader_path/", 13) == 0) {
+       /* no slash, allow to load from any location */
+       okToLoad = PR_TRUE;
+     } else {
 --- nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c
 +++ nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c
 @@ -224,7 +224,11 @@
diff --git a/external/nss/nss-android.patch.1 b/external/nss/nss-android.patch.1
index 642f85b8c509..f7ab73a9b874 100644
--- a/external/nss/nss-android.patch.1
+++ b/external/nss/nss-android.patch.1
@@ -15,7 +15,7 @@ diff -ur nss.org/nspr/build/autoconf/config.sub 
nss/nspr/build/autoconf/config.s
 diff -ur nss.org/nspr/configure nss/nspr/configure
 --- nss.org/nspr/configure     2017-09-07 15:29:45.018246359 +0200
 +++ nss/nspr/configure 2017-09-07 15:31:47.604075663 +0200
-@@ -2728,18 +2728,15 @@
+@@ -3253,18 +3253,15 @@
      esac
  
          AS="$android_toolchain"/bin/"$android_tool_prefix"-as
@@ -35,7 +35,7 @@ diff -ur nss.org/nspr/configure nss/nspr/configure
 -    CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic 
-fno-short-enums -fno-exceptions $CXXFLAGS"
 -    LDFLAGS="-mandroid -L$android_platform/usr/lib 
-Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
  
-     $as_echo "#define ANDROID 1" >>confdefs.h
+     printf "%s
" "#define ANDROID 1" >>confdefs.h
  
 diff -ur nss.org/nss/Makefile nss/nss/Makefile
 --- nss.org/nss/Makefile       2017-09-07 15:29:44.933245745 +0200
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index cc9eeed1b009..7b89ffe7225d 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -11,15 +11,15 @@
                                     # combo is not yet good at debugging 
inlined
 --- a/nss.orig/nspr/pr/src/misc/prnetdb.c      2017-08-29 23:44:13.690045031 
+0530
 +++ b/nss/nspr/pr/src/misc/prnetdb.c   2017-08-29 23:47:03.810814019 +0530
-@@ -441,7 +441,7 @@
-     char *buf = *bufp;
-     PRIntn buflen = *buflenp;
+@@ -405,7 +405,7 @@
+   char* buf = *bufp;
+   PRIntn buflen = *buflenp;
  
--    if (align && ((long)buf & (align - 1))) {
-+    if (align && ((ptrdiff_t)buf & (align - 1))) {
-         PRIntn skip = align - ((ptrdiff_t)buf & (align - 1));
-         if (buflen < skip) {
-             return 0;
+-  if (align && ((long)buf & (align - 1))) {
++  if (align && ((ptrdiff_t)buf & (align - 1))) {
+     PRIntn skip = align - ((ptrdiff_t)buf & (align - 1));
+     if (buflen < skip) {
+       return 0;
 --- a/a/nss/cmd/platlibs.mk    2017-08-29 23:44:13.554044416 +0530
 +++ b/b/nss/cmd/platlibs.mk    2017-08-29 23:46:09.638569150 +0530
 @@ -10,17 +10,22 @@
diff --git a/external/nss/nss_macosx.patch b/external/nss/nss_macosx.patch
index 089993aee2e9..46caa3dad450 100644
--- a/external/nss/nss_macosx.patch
+++ b/external/nss/nss_macosx.patch
@@ -1,8 +1,8 @@
 diff -ru a/nspr/configure b/nspr/configure
 --- a/a/nspr/configure 2014-09-29 16:50:33.907375937 +0100
 +++ b/b/nspr/configure 2014-09-29 16:51:59.213931947 +0100
-@@ -6483,7 +6486,7 @@
- 
+@@ -7221,7 +7221,7 @@
+ fi
  
      DSO_CFLAGS=-fPIC
 -    DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 
-all_load -install_name @executable_path/$@ -headerpad_max_install_names'
commit 6e2bf21f946d1f8bb8c7d3ed468387d672ae9aaf
Author:     Xisco Fauli <[email protected]>
AuthorDate: Tue Mar 18 15:27:20 2025 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 20:22:39 2025 +0100

    nss: upgrade to 3.104
    
    Add uncompr to the static zlib library, otherwise windows build
    will fail with
    
    tstclnt.obj : error LNK2019: unresolved external symbol _uncompress 
referenced in function _zlibCertificateDecode
    
    because it uses USE_SYSTEM_ZLIB=1
    
    Downloaded from 
https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_104_RTM/src/nss-3.104-with-nspr-4.35.tar.gz
    
    Change-Id: Ide3c6c641a0433f11c5b7ac1897e1bd46d85e51b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183092
    Reviewed-by: Xisco Fauli <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit ca0bd3a66d468910ea1e70719b7f836b89ab4276)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193486
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    (cherry picked from commit 0186c77915add78f6979b45feda58dd171ca6f05)

diff --git a/download.lst b/download.lst
index 95deb2595786..54cfe13c01ef 100644
--- a/download.lst
+++ b/download.lst
@@ -409,8 +409,8 @@ NEON_TARBALL := neon-0.30.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-NSS_SHA256SUM := 
1636c8c85794e779855183997805b6edfe2dfb43cdf5b6cf1934bf16b1b32520
-NSS_TARBALL := nss-3.103-with-nspr-4.35.tar.gz
+NSS_SHA256SUM := 
0ea8bab27345e4e0fc0ec0587d01bb54ba7eb46cb5b369c9ed59ee42baa78fa9
+NSS_TARBALL := nss-3.104-with-nspr-4.35.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index 1fabd2f80b7e..1e88265708a6 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -13,7 +13,6 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,nss,$(NSS_TARBALL)))
 
 $(eval $(call gb_UnpackedTarball_add_patches,nss,\
     external/nss/nss.patch \
-    external/nss/nss.aix.patch \
     external/nss/nss-3.13.5-zlib-werror.patch \
     external/nss/nss_macosx.patch \
     external/nss/nss-win32-make.patch.1 \
diff --git a/external/nss/nss.aix.patch b/external/nss/nss.aix.patch
deleted file mode 100644
index 10572f94717a..000000000000
--- a/external/nss/nss.aix.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-diff -ru a/nspr/configure b/nspr/configure
---- a/a/nspr/configure 2014-09-29 16:47:42.984012225 +0100
-+++ b/b/nspr/configure 2014-09-29 16:50:33.907375937 +0100
-@@ -6325,7 +6325,6 @@
-         AIX_LINK_OPTS='-brtl -bnso -berok'
-         ;;
-     esac
--    CFLAGS="$CFLAGS -qro -qroconst"
-     AIX_WRAP='$(DIST)/lib/aixwrap.o'
-     AIX_TMP='./_aix_tmp.o'
-     if test -n "$USE_64"; then
-diff -ru a/nspr/configure.in b/nspr/configure.in
---- a/a/nspr/configure.in      2014-09-29 16:46:35.257394860 +0100
-+++ b/b/nspr/configure.in      2014-09-29 16:50:33.908375942 +0100
-@@ -1180,7 +1180,8 @@
-     AC_DEFINE(XP_UNIX)
-     AC_DEFINE(AIX)
-     AC_DEFINE(SYSV)
--    DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall 
-blibpath:/usr/lib:/lib'
-+    DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib'
-+    MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@'
-     AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
-     case "${target_os}" in
-     aix3.2*)
-@@ -1220,10 +1221,9 @@
-         AC_DEFINE(HAVE_SOCKLEN_T)
-         AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
-         USE_IPV6=1
--        AIX_LINK_OPTS='-brtl -bnso -berok'
-+        AIX_LINK_OPTS='-Wl,-brtl -Wl,-bnso -Wl,-berok'
-         ;;
-     esac
--    CFLAGS="$CFLAGS -qro -qroconst"
-     AIX_WRAP='$(DIST)/lib/aixwrap.o'
-     AIX_TMP='./_aix_tmp.o'
-     if test -n "$USE_64"; then
-diff -ru a/nspr/pr/src/Makefile.in b/nspr/pr/src/Makefile.in
---- a/a/nspr/pr/src/Makefile.in        2014-09-29 16:46:35.281395079 +0100
-+++ b/b/nspr/pr/src/Makefile.in        2014-09-29 16:50:33.909375948 +0100
-@@ -74,7 +74,6 @@
- endif # SunOS
- 
- ifeq ($(OS_ARCH),AIX)
--DSO_LDOPTS    += -binitfini::_PR_Fini
- OS_LIBS               = -lodm -lcfg
- ifeq ($(CLASSIC_NSPR),1)
- ifeq ($(OS_RELEASE),4.1)
-diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
---- a/a/nss/cmd/platlibs.mk    2014-09-29 16:47:42.987012253 +0100
-+++ b/b/nss/cmd/platlibs.mk    2014-09-29 16:50:33.910375955 +0100
-@@ -171,7 +171,7 @@
-       $(NULL)
- 
- ifeq ($(OS_ARCH), AIX) 
--EXTRA_SHARED_LIBS += -brtl 
-+EXTRA_SHARED_LIBS += -Wl,-brtl 
- endif
- 
- # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
-@@ -217,7 +217,7 @@
-       $(NULL)
- 
- ifeq ($(OS_ARCH), AIX) 
--EXTRA_SHARED_LIBS += -brtl 
-+EXTRA_SHARED_LIBS += -Wl,-brtl 
- endif
- 
- # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
-diff -ru a/nss/cmd/shlibsign/Makefile b/nss/cmd/shlibsign/Makefile
---- a/a/nss/cmd/shlibsign/Makefile     2014-09-29 16:46:35.139393785 +0100
-+++ b/b/nss/cmd/shlibsign/Makefile     2014-09-29 16:50:33.910375955 +0100
-@@ -43,6 +43,9 @@
- 
- endif
- 
-+ifeq ($(OS), AIX)
-+EXTRA_SHARED_LIBS += -lpthreads
-+endif
- 
- # sign any and all shared libraries that contain the word freebl
- ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1)
-diff -ru a/nss/cmd/shlibsign/mangle/Makefile 
b/nss/cmd/shlibsign/mangle/Makefile
---- a/a/nss/cmd/shlibsign/mangle/Makefile      2014-09-29 16:46:35.139393785 
+0100
-+++ b/b/nss/cmd/shlibsign/mangle/Makefile      2014-09-29 16:50:33.910375955 
+0100
-@@ -43,7 +43,9 @@
- 
- endif
- 
--
-+ifeq ($(OS), AIX)
-+EXTRA_SHARED_LIBS += -lpthreads
-+endif
- 
- #######################################################################
- # (5) Execute "global" rules. (OPTIONAL)                              #
-diff -ru a/nss/coreconf/AIX.mk b/nss/coreconf/AIX.mk
---- a/a/nss/coreconf/AIX.mk    2014-09-29 16:46:35.040392883 +0100
-+++ b/b/nss/coreconf/AIX.mk    2014-09-29 16:50:33.909375948 +0100
-@@ -30,35 +30,30 @@
- 
- DEFAULT_COMPILER = xlc_r
- 
--CC            = xlc_r
--CCC           = xlC_r
-+CCC           = $(CXX)
- 
- CPU_ARCH      = rs6000
- 
- RANLIB                = ranlib
- 
- OS_CFLAGS     = -DAIX -DSYSV
--OS_LIBS       += -blibpath:/usr/lib:/lib -lc -lm
-+OS_LIBS       += -Wl,-blibpath:/usr/lib:/lib -lc -lm
- 
--DSO_LDOPTS    = -brtl -bnortllib -bM:SRE -bnoentry
--MKSHLIB       = $(LD) $(DSO_LDOPTS) -blibpath:/usr/lib:/lib -lc -lm
-+DSO_LDOPTS    = -Wl,-brtl -Wl,-bnortllib
-+MKSHLIB       = $(CC) --shared $(DSO_LDOPTS) -Wl,-blibpath:/usr/lib:/lib -lc 
-lm
- 
- AIX_WRAP      = $(DIST)/lib/aixwrap.o
- AIX_TMP               = $(OBJDIR)/_aix_tmp.o
- 
- ifdef MAPFILE
--DSO_LDOPTS    += -bexport:$(MAPFILE)
-+DSO_LDOPTS    += -Wl,-bexport:$(MAPFILE)
- else
--DSO_LDOPTS    += -bexpall
-+DSO_LDOPTS    += -Wl,-bexpall
- endif
- 
- PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \
-                 sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' > $@
- 
--ifdef BUILD_OPT
--      OPTIMIZER += -qmaxmem=-1
--endif
--
- ifeq ($(USE_64), 1)
-       OS_CFLAGS       += -DAIX_64BIT
-       OBJECT_MODE=64
diff --git a/external/nss/nss_macosx.patch b/external/nss/nss_macosx.patch
index 72277a425242..089993aee2e9 100644
--- a/external/nss/nss_macosx.patch
+++ b/external/nss/nss_macosx.patch
@@ -68,9 +68,9 @@ diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
 diff -ru a/nss/Makefile b/nss/Makefile
 --- a/a/nss/Makefile   2014-09-29 16:50:22.990304789 +0100
 +++ b/b/nss/Makefile   2014-09-29 16:51:59.207931908 +0100
-@@ -82,6 +82,9 @@
- ifeq ($(OS_TARGET),WIN95)
- NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
+@@ -81,6 +81,9 @@
+ ifdef USE_64
+ NSPR_CONFIGURE_OPTS += --enable-64bit
  endif
 +ifdef MACOS_SDK_DIR
 +NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR)
diff --git a/external/zlib/StaticLibrary_zlib.mk 
b/external/zlib/StaticLibrary_zlib.mk
index f5263bef7d91..6463ffc531fd 100644
--- a/external/zlib/StaticLibrary_zlib.mk
+++ b/external/zlib/StaticLibrary_zlib.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,zlib,\
        UnpackedTarball/zlib/inflate \
        UnpackedTarball/zlib/inftrees \
        UnpackedTarball/zlib/trees \
+       UnpackedTarball/zlib/uncompr \
        UnpackedTarball/zlib/zutil \
 ))
 
commit 0073dfcaf7cf971a9c81ed8d4f9aeeb6b4c86df4
Author:     Xisco Fauli <[email protected]>
AuthorDate: Mon Mar 24 13:21:02 2025 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 20:06:04 2025 +0100

    nss: change target from WIN95 to WINNT
    
    In preparation for the upgrade to nss 3.104
    
    In nss 3.103 or older, when OS_TARGET is not specified, it defaults to
    WIN95, See comment
    
    -  When building on Windows, OS_TARGET now defaults to WIN95. To use the 
WINNT build
          configuration, specify OS_TARGET=WINNT.
    
    in doc/rst/legacy/nss_releases/nss_3.15.4_release_notes/index.rst
    However, in nss 3.104 or newer, WIN95 support has been dropped and
    the WINNT has become the default. It needs some tweaks though:
    
    * Add external/nss/nspr-win95-target.patch to keep building
    nspr with WIN95 target, which is still available in nspr.
    Explicitly pass --enable-win32-target=WIN95 to NSPR_CONFIGURE_OPTS,
    otherwise, it would use WINNT, as nss, and it will fail with
    
    make[7]: *** No rule to make target 'libnspr4.lib', needed by 'build'.  
Stop.
    make[7]: *** Waiting for unfinished jobs....
    
    * Add external/nss/winnt.patch.0 to remove the 'lib' prefix as WIN95 does,
    otherwise it fails with
    
    LINK : fatal error LNK1181: cannot open input file 
'..\..\..\..\dist\out\lib\libplc4.lib'
    
    Change-Id: Ifaf19eeb1398389256a5c441a056f542b409622a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183262
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 81b820a7ea7fded7c30a71a799b9fe1fac1915f9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193485
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    (cherry picked from commit dd8f76a4c8aa24afa2b736e51d7cc64d913cf53c)

diff --git a/external/nss/ExternalProject_nss.mk 
b/external/nss/ExternalProject_nss.mk
index a61fd9eb5be1..87cefbbcbe2f 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -29,6 +29,7 @@ $(call gb_ExternalProject_get_state_target,nss,build): \
                        MOZ_DEBUG_SYMBOLS=1 \
                        MOZ_DEBUG_FLAGS=" " \
                        OPT_CODE_SIZE=0) \
+               OS_TARGET=WINNT \
                USE_SYSTEM_ZLIB=1 \
                $(if $(filter X86_64,$(CPUNAME)),USE_64=1) \
                LIB="$(ILIB)" \
diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index 014a11ce1765..1fabd2f80b7e 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
     external/nss/nss-win32-make.patch.1 \
     external/nss/ubsan.patch.0 \
     external/nss/clang-cl.patch.0 \
+    external/nss/winnt.patch.0 \
     external/nss/nss.vs2015.patch \
     external/nss/nss.vs2015.pdb.patch \
     external/nss/nss.bzmozilla1238154.patch \
@@ -26,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
     external/nss/macos-dlopen.patch.0 \
     external/nss/nss-restore-manual-pre-dependencies.patch.1 \
     external/nss/Wincompatible-function-pointer-types.patch.0 \
+    external/nss/nspr-win95-target.patch \
     $(if $(filter ANDROID,$(OS)), \
         external/nss/nss-android.patch.1) \
     $(if $(filter WNT,$(OS)), \
diff --git a/external/nss/nspr-win95-target.patch 
b/external/nss/nspr-win95-target.patch
new file mode 100644
index 000000000000..92da84ba0b85
--- /dev/null
+++ b/external/nss/nspr-win95-target.patch
@@ -0,0 +1,11 @@
+--- a/nss/nss/Makefile    2025-03-24 15:04:03.270924656 +0100
++++ b/nss/nss/Makefile    2025-03-24 15:04:03.270924656 +0100
+@@ -63,6 +63,8 @@
+ # Translate coreconf build options to NSPR configure options.
+ #
+
++NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
++
+ ifeq ($(OS_TARGET),Android)
+ NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \
+                        --target=$(ANDROID_PREFIX) \
diff --git a/external/nss/winnt.patch.0 b/external/nss/winnt.patch.0
new file mode 100644
index 000000000000..666d12deeb60
--- /dev/null
+++ b/external/nss/winnt.patch.0
@@ -0,0 +1,10 @@
+--- nss/coreconf/WINNT.mk      2025-03-24 14:11:13.771104127 +0100
++++ nss/coreconf/WINNT.mk      2025-03-24 14:11:13.771104127 +0100
+@@ -15,6 +15,3 @@
+ # Win NT needs -GT so that fibers can work
+ #
+ OS_CFLAGS += -GT
+-
+-# WINNT uses the lib prefix, Win95 doesn't
+-NSPR31_LIB_PREFIX = lib
+
commit 2bba85305e3b717717087e4607c26c95438dbb52
Author:     Xisco Fauli <[email protected]>
AuthorDate: Tue Mar 25 00:02:06 2025 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 20:03:50 2025 +0100

    nss: remove unneded patch
    
    This is a follow-up to
    
    commit acf84f9e21999327b831580691430db8c8fe8a71
    Author: Xisco Fauli <[email protected]>
    Date:   Fri Mar 14 12:28:51 2025 +0100
    
        nss: remove obsolete target
    
    In nss 3.103 or older, when OS_TARGET is not specified, it defaults to WIN95
    anyway. See comment
    
    -  When building on Windows, OS_TARGET now defaults to WIN95. To use the 
WINNT build
          configuration, specify OS_TARGET=WINNT.
    
    in doc/rst/legacy/nss_releases/nss_3.15.4_release_notes/index.rst
    thus, nspr is built with --enable-win32-target=WIN95 as the Makefile
    does
    
    ifeq ($(OS_TARGET),WIN95)
    NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
    endif
    
    consequently, the patch added in
    commit 486c91147c587febdacf3fa95d56633dbd703d5f
    Author: David Ostrovsky <[email protected]>
    Date:   Tue Feb 23 22:25:06 2016 +0100
    
        Bump nss to 3.22.1 and nspr to 4.12
    
    can be removed. The reason why it was added initially
    is unclear to me though
    
    Change-Id: I9a2acc2b2cdd560fce9166c2e6e11c71ee21b5e1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183282
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 31eaf2686a1017729d7f7075ce3330b8ea719b56)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193484
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    (cherry picked from commit 75361bcf29cc274bcb0b93a2632bddb0ef477c8b)

diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index 6f9e482c8f3c..014a11ce1765 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -28,8 +28,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
     external/nss/Wincompatible-function-pointer-types.patch.0 \
     $(if $(filter ANDROID,$(OS)), \
         external/nss/nss-android.patch.1) \
-    $(if $(filter MSC-INTEL,$(COM)-$(CPUNAME)), \
-        external/nss/nss.cygwin64.in32bit.patch) \
     $(if $(filter WNT,$(OS)), \
         external/nss/nss.windows.patch \
         external/nss/nss.nowerror.patch \
diff --git a/external/nss/nss.cygwin64.in32bit.patch 
b/external/nss/nss.cygwin64.in32bit.patch
deleted file mode 100644
index bce0f1d09403..000000000000
--- a/external/nss/nss.cygwin64.in32bit.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-This fixes architecture mismatch, when building
-on Cygwin 64bit and in 32bit mode
-diff -ru nss.orig/nss/Makefile nss/nss/Makefile
---- a/nss.orig/nss/Makefile       2016-02-26 01:00:52.146713100 +0100
-+++ b/nss/nss/Makefile    2016-02-26 01:02:05.303560100 +0100
-@@ -63,6 +63,8 @@
- # Translate coreconf build options to NSPR configure options.
- #
-
-+NSPR_CONFIGURE_OPTS += --host=i686-pc-cygwin
-+
- ifeq ($(OS_TARGET),Android)
- NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \
-                        --target=$(ANDROID_PREFIX) \
commit fc8b2fcf31ccb544d34bb7ae45ad61b778a67c64
Author:     Xisco Fauli <[email protected]>
AuthorDate: Tue Mar 18 12:49:20 2025 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 19:57:58 2025 +0100

    nss: upgrade to 3.103
    
    Add initialize() method to hash class: in PDFWriterImpl::emitTrailer
    we need to re-initialize the hash after calling finalize(),
    otherwise update() inside writeBuffer will fail with
    Assertion failure: rv == SECSuccess, at sechash.c:140
    See 
https://lists.freedesktop.org/archives/libreoffice/2025-March/093075.html
    
    Downloaded from 
https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_103_RTM/src/nss-3.103-with-nspr-4.35.tar.gz
    
    Change-Id: Iebf144be7bce9f45900b427adedc7465e4b2e4e3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183075
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit c8bfafbbf802a690d94807b6292852bb754818e0)

diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx
index ca5467904c22..9efccd6fd59b 100644
--- a/comphelper/source/misc/hash.cxx
+++ b/comphelper/source/misc/hash.cxx
@@ -79,9 +79,18 @@ struct HashImpl
 #if USE_TLS_NSS
         NSS_NoDB_Init(nullptr);
         mpContext = HASH_Create(getNSSType());
-        HASH_Begin(mpContext);
 #elif USE_TLS_OPENSSL
         mpContext = EVP_MD_CTX_create();
+#endif
+
+        initialize();
+    }
+
+    void initialize()
+    {
+#if USE_TLS_NSS
+        HASH_Begin(mpContext);
+#elif USE_TLS_OPENSSL
         EVP_DigestInit_ex(mpContext, getOpenSSLType(), NULL);
 #endif
     }
@@ -117,6 +126,11 @@ void Hash::update(const unsigned char* pInput, size_t 
length)
 #endif
 }
 
+void Hash::initialize()
+{
+    mpImpl->initialize();
+}
+
 std::vector<unsigned char> Hash::finalize()
 {
     std::vector<unsigned char> hash(getLength(), 0);
diff --git a/download.lst b/download.lst
index a0de13944e63..95deb2595786 100644
--- a/download.lst
+++ b/download.lst
@@ -409,8 +409,8 @@ NEON_TARBALL := neon-0.30.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-NSS_SHA256SUM := 
ddfdec73fb4b0eedce5fc4de09de9ba14d2ddbfbf67e42372903e1510f2d3d65
-NSS_TARBALL := nss-3.102.1-with-nspr-4.35.tar.gz
+NSS_SHA256SUM := 
1636c8c85794e779855183997805b6edfe2dfb43cdf5b6cf1934bf16b1b32520
+NSS_TARBALL := nss-3.103-with-nspr-4.35.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/nss/nss-android.patch.1 b/external/nss/nss-android.patch.1
index cbf7f5402f3f..642f85b8c509 100644
--- a/external/nss/nss-android.patch.1
+++ b/external/nss/nss-android.patch.1
@@ -40,7 +40,7 @@ diff -ur nss.org/nspr/configure nss/nspr/configure
 diff -ur nss.org/nss/Makefile nss/nss/Makefile
 --- nss.org/nss/Makefile       2017-09-07 15:29:44.933245745 +0200
 +++ nss/nss/Makefile   2017-09-07 15:32:04.347181076 +0200
-@@ -65,7 +65,7 @@
+@@ -67,7 +67,7 @@
  
  ifeq ($(OS_TARGET),Android)
  NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \
diff --git a/include/comphelper/hash.hxx b/include/comphelper/hash.hxx
index ae16d5ddd57f..3631fca1801c 100644
--- a/include/comphelper/hash.hxx
+++ b/include/comphelper/hash.hxx
@@ -51,6 +51,8 @@ public:
 
     void update(const unsigned char* pInput, size_t length);
 
+    void initialize();
+
     std::vector<unsigned char> finalize();
 
     static std::vector<unsigned char> calculateHash(const unsigned char* 
pInput, size_t length, HashType eType);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index a2a3f5ca9a5b..6def6f4526b9 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5511,6 +5511,12 @@ bool PDFWriterImpl::emitTrailer()
         }
         aLine.append( "]
" );
     }
+
+    // After calling m_DocDigest.finalize(), we need to initialize the hash 
again,
+    // otherwise, m_DocDigest.update() inside writeBuffer will fail with
+    // Assertion failure: rv == SECSuccess, at sechash.c:140
+    m_DocDigest.initialize();
+
     aLine.append( ">>
"
                   "startxref
" );
     aLine.append( static_cast<sal_Int64>(nXRefOffset) );
commit 34f4f1cb734a17ca025e77de3dfec2821b87dd54
Author:     Xisco Fauli <[email protected]>
AuthorDate: Fri Mar 14 12:28:51 2025 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 7 19:39:03 2025 +0100

    nss: remove obsolete target
    
    it has been removed in recent versions of nss.
    Do it in preparation for the upgrade.
    
    Change-Id: I2dbcdb065c59e3d79235fb8a17dc072f4826319b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182914
    Reviewed-by: Xisco Fauli <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit acf84f9e21999327b831580691430db8c8fe8a71)

diff --git a/external/nss/ExternalProject_nss.mk 
b/external/nss/ExternalProject_nss.mk
index 6d8dc7c5d3d4..a61fd9eb5be1 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -29,7 +29,6 @@ $(call gb_ExternalProject_get_state_target,nss,build): \
                        MOZ_DEBUG_SYMBOLS=1 \
                        MOZ_DEBUG_FLAGS=" " \
                        OPT_CODE_SIZE=0) \
-               OS_TARGET=WIN95 \
                USE_SYSTEM_ZLIB=1 \
                $(if $(filter X86_64,$(CPUNAME)),USE_64=1) \
                LIB="$(ILIB)" \

Reply via email to