comphelper/source/misc/hash.cxx | 16 download.lst | 4 external/nss/ExternalProject_nss.mk | 2 external/nss/UnpackedTarball_nss.mk | 4 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 | 18 external/nss/nss-ios.patch | 36 - external/nss/nss.cygwin64.in32bit.patch | 14 external/nss/nss.getrandom.patch | 23 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 | 5 18 files changed, 308 insertions(+), 312 deletions(-)
New commits: commit be572fe51c2de9801573b9d9c8b106f96917909f Author: Xisco Fauli <[email protected]> AuthorDate: Thu Jul 31 17:13:05 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:08 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]> diff --git a/download.lst b/download.lst index a62950437bed..788b936f99b6 100644 --- a/download.lst +++ b/download.lst @@ -580,8 +580,8 @@ MYTHES_TARBALL := mythes-1.2.5.tar.xz # 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 808258d303cd2195f2f79dc69c14769c6c3c0de1 Author: Xisco Fauli <[email protected]> AuthorDate: Wed Jul 2 09:59:50 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:08 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]> diff --git a/download.lst b/download.lst index e578e3ee8d6d..a62950437bed 100644 --- a/download.lst +++ b/download.lst @@ -580,8 +580,8 @@ MYTHES_TARBALL := mythes-1.2.5.tar.xz # 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 5814e0eaa1621375a5d86a762a3edc9992f6f8ef Author: Xisco Fauli <[email protected]> AuthorDate: Fri Jun 20 09:13:51 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:08 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]> diff --git a/download.lst b/download.lst index 5d62df0b67dc..e578e3ee8d6d 100644 --- a/download.lst +++ b/download.lst @@ -580,8 +580,8 @@ MYTHES_TARBALL := mythes-1.2.5.tar.xz # 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 e20aab3b9ff1..dc5f8e0a884e 100644 --- a/external/nss/clang-cl.patch.0 +++ b/external/nss/clang-cl.patch.0 @@ -72,17 +72,6 @@ /* make GCC warn when we use these #defines */ typedef int __BLAPI_DEPRECATED __attribute__((deprecated)); #define DSA_SUBPRIME_LEN ((__BLAPI_DEPRECATED)DSA1_SUBPRIME_LEN) ---- 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 a81350ab4a226faeddc2b03855db4b1fdb12938c Author: Xisco Fauli <[email protected]> AuthorDate: Tue May 27 18:25:02 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:08 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]> diff --git a/download.lst b/download.lst index 640b8d78330e..5d62df0b67dc 100644 --- a/download.lst +++ b/download.lst @@ -580,8 +580,8 @@ MYTHES_TARBALL := mythes-1.2.5.tar.xz # 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 4d44a1b93c11e44f29f14f77f3872c7356606414 Author: Xisco Fauli <[email protected]> AuthorDate: Mon May 5 12:18:01 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:08 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]> diff --git a/download.lst b/download.lst index 7f8cb5d7a60f..640b8d78330e 100644 --- a/download.lst +++ b/download.lst @@ -580,8 +580,8 @@ MYTHES_TARBALL := mythes-1.2.5.tar.xz # 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 2045b69d17ef2ac7da850cbf74fb2e6d82c96374 Author: Xisco Fauli <[email protected]> AuthorDate: Mon Mar 31 10:18:11 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:08 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]> diff --git a/download.lst b/download.lst index 9ee570f64e3d..7f8cb5d7a60f 100644 --- a/download.lst +++ b/download.lst @@ -580,8 +580,8 @@ MYTHES_TARBALL := mythes-1.2.5.tar.xz # 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 e217268bd4b1660345472ada1a2d75e95fbe2c33 Author: Xisco Fauli <[email protected]> AuthorDate: Mon Feb 17 12:06:37 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:08 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]> diff --git a/download.lst b/download.lst index 418a6ba62403..9ee570f64e3d 100644 --- a/download.lst +++ b/download.lst @@ -580,8 +580,8 @@ MYTHES_TARBALL := mythes-1.2.5.tar.xz # 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 aeb690666450..9a7178bc2e61 100644 --- a/external/nss/nss-android.patch.1 +++ b/external/nss/nss-android.patch.1 @@ -16,7 +16,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 @@ -36,7 +36,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-ios.patch b/external/nss/nss-ios.patch index 6f6b149cead5..8f2b7bee5e61 100644 --- a/external/nss/nss-ios.patch +++ b/external/nss/nss-ios.patch @@ -58,24 +58,24 @@ --- a/a/nss/lib/pk11wrap/pk11load.c +++ a/a/nss/lib/pk11wrap/pk11load.c -@@ -390,6 +390,8 @@ - /* - * load a new module into our address space and initialize it. - */ +@@ -31,6 +31,8 @@ + #include "debug_module.c" + #endif + +extern CK_RV NSSCKBI_C_GetFunctionList(); + - SECStatus - secmod_LoadPKCS11Module(SECMODModule *mod, SECMODModule **oldModule) - { -@@ -468,6 +470,7 @@ + /* build the PKCS #11 2.01 lock files */ + CK_RV PR_CALLBACK + secmodCreateMutext(CK_VOID_PTR_PTR pmutex) +@@ -456,6 +456,7 @@ /* load the library. If this succeeds, then we have to remember to - * unload the library if anything goes wrong from here on out... - */ + * unload the library if anything goes wrong from here on out... + */ +#ifndef NSS_STATIC_PKCS11 // With NSS_STATIC_PKCS11, the only module wodule we load here is nssckbi #if defined(_WIN32) if (nssUTF8_Length(mod->dllName, NULL)) { wchar_t *dllNameWide = _NSSUTIL_UTF8ToWide(mod->dllName); -@@ -507,6 +510,10 @@ +@@ -495,6 +496,11 @@ mod->moduleDBFunc = (void *) PR_FindSymbol(library, "NSS_ReturnModuleSpecData"); } @@ -83,11 +83,12 @@ + if (strcmp(mod->dllName, "NSSCKBI") == 0) + fentry = NSSCKBI_C_GetFunctionList; +#endif ++ if (mod->moduleDBFunc == NULL) mod->isModuleDB = PR_FALSE; if ((ientry == NULL) && (fentry == NULL)) { -@@ -643,10 +650,12 @@ - } +@@ -545,10 +551,12 @@ + fail: mod->functionList = NULL; +#ifndef NSS_STATIC_PKCS11 diff --git a/external/nss/nss.getrandom.patch b/external/nss/nss.getrandom.patch index b7f883b64d5a..658d3a2a3679 100644 --- a/external/nss/nss.getrandom.patch +++ b/external/nss/nss.getrandom.patch @@ -1,23 +1,22 @@ --- a/nss/nspr/pr/src/md/unix/uxrng.c +++ b/nss/nspr/pr/src/md/unix/uxrng.c -@@ -68,13 +68,18 @@ - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> -+#include <dlfcn.h> +@@ -56,12 +56,17 @@ + # include <sys/types.h> + # include <sys/stat.h> + # include <fcntl.h> ++# include <dlfcn.h> - static int fdDevURandom; + static int fdDevURandom; static PRCallOnceType coOpenDevURandom; - static PRStatus OpenDevURandom( void ) - { -- fdDevURandom = open( "/dev/urandom", O_RDONLY ); + static PRStatus OpenDevURandom(void) { +- fdDevURandom = open("/dev/urandom", O_RDONLY); + static int (*lok_open_urandom)(); + if (!lok_open_urandom) + lok_open_urandom = dlsym(RTLD_DEFAULT, "lok_open_urandom"); + if (!lok_open_urandom || (fdDevURandom = lok_open_urandom()) < 0) + fdDevURandom = open( "/dev/urandom", O_RDONLY ); - return((-1 == fdDevURandom)? PR_FAILURE : PR_SUCCESS ); + return ((-1 == fdDevURandom) ? PR_FAILURE : PR_SUCCESS); } /* end OpenDevURandom() */ --- a/nss/nss/lib/freebl/unix_rand.c @@ -82,10 +81,10 @@ #include "secerr.h" #include "secrng.h" #include "prprf.h" -@@ -62,7 +63,11 @@ +@@ -66,7 +66,11 @@ * Reset the number of bytes to get and fall back to /dev/urandom. */ fileBytes = 0; - #endif + #endif /* platorm has getentropy */ - fd = open("/dev/urandom", O_RDONLY); + static int (*lok_open_urandom)(); + if (!lok_open_urandom) 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 cc433fdfb766..13cf0cda706b 100644 --- a/external/nss/nss_macosx.patch +++ b/external/nss/nss_macosx.patch @@ -11,8 +11,8 @@ diff -ru a/nspr/configure b/nspr/configure arm*) CPU_ARCH=arm ;; -@@ -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 dffb5ea5b252829b2807bf7cb2893b8f91a8effe Author: Xisco Fauli <[email protected]> AuthorDate: Tue Mar 18 15:27:20 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:07 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]> diff --git a/download.lst b/download.lst index 2614f4d8f7a6..418a6ba62403 100644 --- a/download.lst +++ b/download.lst @@ -580,8 +580,8 @@ MYTHES_TARBALL := mythes-1.2.5.tar.xz # 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/nss_macosx.patch b/external/nss/nss_macosx.patch index 456bd62d509b..cc433fdfb766 100644 --- a/external/nss/nss_macosx.patch +++ b/external/nss/nss_macosx.patch @@ -78,9 +78,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 4fb4d8ff5926ac9a48f10f77a1ee4e7654cb3daa Author: Xisco Fauli <[email protected]> AuthorDate: Mon Mar 24 13:21:02 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:07 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]> diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk index 0ebba1a50583..3a9715862abe 100644 --- a/external/nss/ExternalProject_nss.mk +++ b/external/nss/ExternalProject_nss.mk @@ -30,6 +30,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) \ $(if $(filter AARCH64,$(CPUNAME)),USE_64=1 CPU_ARCH=aarch64) \ diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk index 5d8b88694bfb..5915af095a54 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 LINUX,$(OS)), \ external/nss/nss.disablefsync.patch \ external/nss/nss.getrandom.patch) \ 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 478eb24acf4e7ddcfabdc359cb3e054ec8aa8bfd Author: Xisco Fauli <[email protected]> AuthorDate: Tue Mar 25 00:02:06 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:07 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]> diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk index 7a9010bdf743..5d8b88694bfb 100644 --- a/external/nss/UnpackedTarball_nss.mk +++ b/external/nss/UnpackedTarball_nss.mk @@ -33,8 +33,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\ external/nss/nss-ios.patch) \ $(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 b61e66000b16b6731e33f73462a24a2f132bccad Author: Xisco Fauli <[email protected]> AuthorDate: Tue Mar 18 12:49:20 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:07 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) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193483 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx index 96e125cac23d..164a15b01cdf 100644 --- a/comphelper/source/misc/hash.cxx +++ b/comphelper/source/misc/hash.cxx @@ -105,9 +105,18 @@ struct HashImpl } } 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(), nullptr); #endif } @@ -143,6 +152,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 fc24d0fc910a..2614f4d8f7a6 100644 --- a/download.lst +++ b/download.lst @@ -580,8 +580,8 @@ MYTHES_TARBALL := mythes-1.2.5.tar.xz # 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 707fcf99afe0..aeb690666450 100644 --- a/external/nss/nss-android.patch.1 +++ b/external/nss/nss-android.patch.1 @@ -41,7 +41,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) \ @@ -50,16 +50,14 @@ diff -ur nss.org/nss/Makefile nss/nss/Makefile --with-android-version=$(OS_TARGET_RELEASE) \ --with-android-toolchain=$(ANDROID_TOOLCHAIN) \ --with-android-platform=$(ANDROID_SYSROOT) ---- nss/nss/Makefile.orig 2019-11-26 14:52:15.934561202 +0100 -+++ nss/nss/Makefile 2019-11-26 14:52:20.538559612 +0100 -@@ -140,7 +140,6 @@ - +@@ -143,7 +143,6 @@ + ifndef NSS_DISABLE_NSPR_TESTS build_nspr: $(NSPR_CONFIG_STATUS) $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) - $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/pr/tests - - install_nspr: build_nspr - $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install + else + build_nspr: $(NSPR_CONFIG_STATUS) + $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) --- nss/nss/lib/ckfw/builtins/manifest.mn.orig 2019-11-26 15:18:22.185985193 +0100 +++ nss/nss/lib/ckfw/builtins/manifest.mn 2019-11-26 15:18:29.281982387 +0100 @@ -5,7 +5,7 @@ diff --git a/external/nss/nss-ios.patch b/external/nss/nss-ios.patch index 58239f718978..6f6b149cead5 100644 --- a/external/nss/nss-ios.patch +++ b/external/nss/nss-ios.patch @@ -16,14 +16,14 @@ endif # -@@ -140,7 +138,6 @@ - +@@ -141,7 +143,6 @@ + ifndef NSS_DISABLE_NSPR_TESTS build_nspr: $(NSPR_CONFIG_STATUS) $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) - $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/pr/tests - - install_nspr: build_nspr - $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install + else + build_nspr: $(NSPR_CONFIG_STATUS) + $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) --- a/a/nss/lib/ckfw/builtins/manifest.mn +++ a/a/nss/lib/ckfw/builtins/manifest.mn @@ -5,7 +5,7 @@ @@ -75,7 +75,7 @@ #if defined(_WIN32) if (nssUTF8_Length(mod->dllName, NULL)) { wchar_t *dllNameWide = _NSSUTIL_UTF8ToWide(mod->dllName); -@@ -507,6 +510,11 @@ +@@ -507,6 +510,10 @@ mod->moduleDBFunc = (void *) PR_FindSymbol(library, "NSS_ReturnModuleSpecData"); } @@ -83,11 +83,10 @@ + if (strcmp(mod->dllName, "NSSCKBI") == 0) + fentry = NSSCKBI_C_GetFunctionList; +#endif -+ if (mod->moduleDBFunc == NULL) mod->isModuleDB = PR_FALSE; if ((ientry == NULL) && (fentry == NULL)) { -@@ -643,10 +651,12 @@ +@@ -643,10 +650,12 @@ } fail: mod->functionList = NULL; diff --git a/include/comphelper/hash.hxx b/include/comphelper/hash.hxx index 9567904e6080..30bcb289ec97 100644 --- a/include/comphelper/hash.hxx +++ b/include/comphelper/hash.hxx @@ -66,6 +66,8 @@ public: update(rInput.data(), rInput.size()); } + 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 ad789281146f..b87928143f2d 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6186,6 +6186,11 @@ 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 0afecd341711a1d41047a127b2e6bca28fcdcc6a Author: Xisco Fauli <[email protected]> AuthorDate: Fri Mar 14 12:28:51 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Sat Nov 8 10:28:07 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) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193482 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk index 9b44bd2948e1..0ebba1a50583 100644 --- a/external/nss/ExternalProject_nss.mk +++ b/external/nss/ExternalProject_nss.mk @@ -30,7 +30,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) \ $(if $(filter AARCH64,$(CPUNAME)),USE_64=1 CPU_ARCH=aarch64) \
