changeset 5504:d709836c44d7 pg-transactions

integration mainline->pg-transactions
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 Jan 2024 17:32:25 +0100
parents f498ecd6a5d2 (current diff) 5910aa0c96ce (diff)
children 386d7071b79d
files NEWS
diffstat 13 files changed, 212 insertions(+), 216 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Wed Jan 24 15:57:15 2024 +0100
+++ b/NEWS	Wed Jan 24 17:32:25 2024 +0100
@@ -20,7 +20,10 @@
 -----------
 
 * Upgraded dependencies for static builds:
+  - boost 1.84.0
+  - curl 8.5.0
   - dcmtk 3.6.8
+  - openssl 3.1.4
 
 
 Version 1.12.2 (2023-12-19)
--- a/OrthancFramework/Resources/CMake/BoostConfiguration.cmake	Wed Jan 24 15:57:15 2024 +0100
+++ b/OrthancFramework/Resources/CMake/BoostConfiguration.cmake	Wed Jan 24 17:32:25 2024 +0100
@@ -90,10 +90,10 @@
   ## Parameters for static compilation of Boost 
   ##
   
-  set(BOOST_NAME boost_1_83_0)
-  set(BOOST_VERSION 1.83.0)
-  set(BOOST_BCP_SUFFIX bcpdigest-1.12.2)
-  set(BOOST_MD5 "6a9c4af273635301ed1e221054c34c69")
+  set(BOOST_NAME boost_1_84_0)
+  set(BOOST_VERSION 1.84.0)
+  set(BOOST_BCP_SUFFIX bcpdigest-1.12.3)
+  set(BOOST_MD5 "af64830e570249076a0f024ae4654b59")
   set(BOOST_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz")
   set(BOOST_SOURCES_DIR ${CMAKE_BINARY_DIR}/${BOOST_NAME})
 
@@ -114,7 +114,7 @@
   if (FirstRun)
     execute_process(
       COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
-      ${CMAKE_CURRENT_LIST_DIR}/../Patches/boost-1.83.0-emscripten.patch
+      ${CMAKE_CURRENT_LIST_DIR}/../Patches/boost-1.84.0-emscripten.patch
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
       RESULT_VARIABLE Failure
       )
@@ -134,7 +134,7 @@
   endif()
 
   include_directories(
-    BEFORE
+    BEFORE SYSTEM
     ${BOOST_SOURCES_DIR}
     ${BOOST_SOURCES_DIR}/libs/atomic/src/
     ${BOOST_SOURCES_DIR}/libs/locale/src/
--- a/OrthancFramework/Resources/CMake/BoostConfiguration.sh	Wed Jan 24 15:57:15 2024 +0100
+++ b/OrthancFramework/Resources/CMake/BoostConfiguration.sh	Wed Jan 24 17:32:25 2024 +0100
@@ -24,10 +24,11 @@
 ##   - Orthanc between 1.5.5 and 1.11.1: Boost 1.69.0
 ##   - Orthanc between 1.11.2 and 1.12.0: Boost 1.80.0
 ##   - Orthanc 1.12.1: Boost 1.82.0
-##   - Orthanc > 1.12.1: Boost 1.83.0
+##   - Orthanc 1.12.2: Boost 1.83.0
+##   - Orthanc > 1.12.3: Boost 1.84.0
 
-BOOST_VERSION=1_83_0
-ORTHANC_VERSION=1.12.2
+BOOST_VERSION=1_84_0
+ORTHANC_VERSION=1.12.3
 
 rm -rf /tmp/boost_${BOOST_VERSION}
 rm -rf /tmp/bcp/boost_${BOOST_VERSION}
--- a/OrthancFramework/Resources/CMake/LibCurlConfiguration.cmake	Wed Jan 24 15:57:15 2024 +0100
+++ b/OrthancFramework/Resources/CMake/LibCurlConfiguration.cmake	Wed Jan 24 17:32:25 2024 +0100
@@ -20,9 +20,9 @@
 
 
 if (STATIC_BUILD OR NOT USE_SYSTEM_CURL)
-  SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-7.77.0)
-  SET(CURL_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/curl-7.77.0.tar.gz")
-  SET(CURL_MD5 "478e8b06801d9d030609c9e6cf859229")
+  SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-8.5.0)
+  SET(CURL_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/curl-8.5.0.tar.gz")
+  SET(CURL_MD5 "0bc69288b20ae165ff4b7d6d7bbe70d2")
 
   if (IS_DIRECTORY "${CURL_SOURCES_DIR}")
     set(FirstRun OFF)
@@ -35,7 +35,7 @@
   if (FirstRun)
     execute_process(
       COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
-      ${CMAKE_CURRENT_LIST_DIR}/../Patches/curl-7.77.0.patch
+      ${CMAKE_CURRENT_LIST_DIR}/../Patches/curl-8.5.0.patch
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
       RESULT_VARIABLE Failure
       )
@@ -46,11 +46,14 @@
   endif()
   
   include_directories(
+    SYSTEM BEFORE
     ${CURL_SOURCES_DIR}/include
+    ${CURL_SOURCES_DIR}/lib
     )
 
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib CURL_SOURCES)
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vauth CURL_SOURCES)
+  AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vquic CURL_SOURCES)
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vtls CURL_SOURCES)
   source_group(ThirdParty\\LibCurl REGULAR_EXPRESSION ${CURL_SOURCES_DIR}/.*)
 
--- a/OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-3.0.cmake	Wed Jan 24 15:57:15 2024 +0100
+++ b/OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-3.0.cmake	Wed Jan 24 17:32:25 2024 +0100
@@ -21,12 +21,12 @@
 
 set(OPENSSL_VERSION_MAJOR 3)
 set(OPENSSL_VERSION_MINOR 1)
-set(OPENSSL_VERSION_PATCH 0)
+set(OPENSSL_VERSION_PATCH 4)
 set(OPENSSL_VERSION_PRE_RELEASE "")
 set(OPENSSL_VERSION_FULL "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_PATCH}${OPENSSL_VERSION_PRE_RELEASE}")
 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-${OPENSSL_VERSION_FULL})
 SET(OPENSSL_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/openssl-${OPENSSL_VERSION_FULL}.tar.gz")
-SET(OPENSSL_MD5 "f6c520aa2206d4d1fa71ea30b5e9a56d")
+SET(OPENSSL_MD5 "653ad58812c751b887e8ec37e02bba70")
 
 if (IS_DIRECTORY "${OPENSSL_SOURCES_DIR}")
   set(FirstRun OFF)
@@ -124,7 +124,7 @@
 
 
 include_directories(
-  BEFORE
+  BEFORE SYSTEM
   ${OPENSSL_SOURCES_DIR}
   ${OPENSSL_SOURCES_DIR}/crypto/asn1
   ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448
--- a/OrthancFramework/Resources/Patches/boost-1.83.0-emscripten.patch	Wed Jan 24 15:57:15 2024 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-diff -urEb boost_1_83_0.orig/libs/locale/src/boost/locale/shared/date_time.cpp boost_1_83_0/libs/locale/src/boost/locale/shared/date_time.cpp
---- boost_1_83_0.orig/libs/locale/src/boost/locale/shared/date_time.cpp	2023-10-11 14:35:14.000000000 +0200
-+++ boost_1_83_0/libs/locale/src/boost/locale/shared/date_time.cpp	2023-10-11 15:10:23.949459131 +0200
-@@ -7,8 +7,10 @@
- #include <boost/locale/date_time.hpp>
- #include <boost/locale/formatting.hpp>
- #include <boost/core/exchange.hpp>
--#include <boost/thread/locks.hpp>
--#include <boost/thread/mutex.hpp>
-+#if !defined(__EMSCRIPTEN__)
-+#  include <boost/thread/locks.hpp>
-+#  include <boost/thread/mutex.hpp>
-+#endif
- #include <cmath>
- 
- namespace boost { namespace locale {
-@@ -394,6 +396,7 @@
-         return impl_->get_option(abstract_calendar::is_dst) != 0;
-     }
- 
-+#if !defined(__EMSCRIPTEN__)
-     namespace time_zone {
-         boost::mutex& tz_mutex()
-         {
-@@ -416,5 +419,6 @@
-             return boost::exchange(tz_id(), new_id);
-         }
-     } // namespace time_zone
-+#endif
- 
- }} // namespace boost::locale
-diff -urEb boost_1_83_0.orig/libs/locale/src/boost/locale/shared/generator.cpp boost_1_83_0/libs/locale/src/boost/locale/shared/generator.cpp
---- boost_1_83_0.orig/libs/locale/src/boost/locale/shared/generator.cpp	2023-10-11 14:35:14.000000000 +0200
-+++ boost_1_83_0/libs/locale/src/boost/locale/shared/generator.cpp	2023-10-11 15:10:01.301651695 +0200
-@@ -7,8 +7,11 @@
- #include <boost/locale/encoding.hpp>
- #include <boost/locale/generator.hpp>
- #include <boost/locale/localization_backend.hpp>
--#include <boost/thread/locks.hpp>
--#include <boost/thread/mutex.hpp>
-+
-+#if !defined(__EMSCRIPTEN__)
-+#  include <boost/thread/locks.hpp>
-+#  include <boost/thread/mutex.hpp>
-+#endif
- #include <algorithm>
- #include <map>
- #include <vector>
-@@ -21,7 +24,9 @@
-         {}
- 
-         mutable std::map<std::string, std::locale> cached;
-+#if !defined(__EMSCRIPTEN__)
-         mutable boost::mutex cached_lock;
-+#endif
- 
-         category_t cats;
-         char_facet_t chars;
-@@ -101,7 +106,9 @@
-     std::locale generator::generate(const std::locale& base, const std::string& id) const
-     {
-         if(d->caching_enabled) {
-+#if !defined(__EMSCRIPTEN__)
-             boost::unique_lock<boost::mutex> guard(d->cached_lock);
-+#endif
-             const auto p = d->cached.find(id);
-             if(p != d->cached.end())
-                 return p->second;
-@@ -126,7 +133,9 @@
-                 result = backend->install(result, facet, char_facet_t::nochar);
-         }
-         if(d->caching_enabled) {
-+#if !defined(__EMSCRIPTEN__)
-             boost::unique_lock<boost::mutex> guard(d->cached_lock);
-+#endif
-             const auto p = d->cached.find(id);
-             if(p == d->cached.end())
-                 d->cached[id] = result;
-diff -urEb boost_1_83_0.orig/libs/locale/src/boost/locale/shared/localization_backend.cpp boost_1_83_0/libs/locale/src/boost/locale/shared/localization_backend.cpp
---- boost_1_83_0.orig/libs/locale/src/boost/locale/shared/localization_backend.cpp	2023-10-11 14:35:14.000000000 +0200
-+++ boost_1_83_0/libs/locale/src/boost/locale/shared/localization_backend.cpp	2023-10-11 15:11:11.549053453 +0200
-@@ -5,8 +5,10 @@
- // https://www.boost.org/LICENSE_1_0.txt
- 
- #include <boost/locale/localization_backend.hpp>
--#include <boost/thread/locks.hpp>
--#include <boost/thread/mutex.hpp>
-+#if !defined(__EMSCRIPTEN__)
-+#  include <boost/thread/locks.hpp>
-+#  include <boost/thread/mutex.hpp>
-+#endif
- #include <functional>
- #include <memory>
- #include <vector>
-@@ -211,11 +213,13 @@
-             return mgr;
-         }
- 
-+#if !defined(__EMSCRIPTEN__)
-         boost::mutex& localization_backend_manager_mutex()
-         {
-             static boost::mutex the_mutex;
-             return the_mutex;
-         }
-+#endif
-         localization_backend_manager& localization_backend_manager_global()
-         {
-             static localization_backend_manager the_manager = make_default_backend_mgr();
-@@ -225,12 +229,16 @@
- 
-     localization_backend_manager localization_backend_manager::global()
-     {
-+#if !defined(__EMSCRIPTEN__)
-         boost::unique_lock<boost::mutex> lock(localization_backend_manager_mutex());
-+#endif
-         return localization_backend_manager_global();
-     }
-     localization_backend_manager localization_backend_manager::global(const localization_backend_manager& in)
-     {
-+#if !defined(__EMSCRIPTEN__)
-         boost::unique_lock<boost::mutex> lock(localization_backend_manager_mutex());
-+#endif
-         return exchange(localization_backend_manager_global(), in);
-     }
- 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancFramework/Resources/Patches/boost-1.84.0-emscripten.patch	Wed Jan 24 17:32:25 2024 +0100
@@ -0,0 +1,125 @@
+diff -urEb boost_1_84_0.orig/libs/locale/src/boost/locale/shared/date_time.cpp boost_1_84_0/libs/locale/src/boost/locale/shared/date_time.cpp
+--- boost_1_84_0.orig/libs/locale/src/boost/locale/shared/date_time.cpp	2024-01-24 16:33:34.349801130 +0100
++++ boost_1_84_0/libs/locale/src/boost/locale/shared/date_time.cpp	2024-01-24 16:35:29.516750122 +0100
+@@ -12,8 +12,10 @@
+ #include <boost/locale/date_time.hpp>
+ #include <boost/locale/formatting.hpp>
+ #include <boost/core/exchange.hpp>
+-#include <boost/thread/locks.hpp>
+-#include <boost/thread/mutex.hpp>
++#if !defined(__EMSCRIPTEN__)
++#  include <boost/thread/locks.hpp>
++#  include <boost/thread/mutex.hpp>
++#endif
+ #include <cmath>
+ 
+ namespace boost { namespace locale {
+@@ -400,6 +402,7 @@
+         return impl_->get_option(abstract_calendar::is_dst) != 0;
+     }
+ 
++#if !defined(__EMSCRIPTEN__)
+     namespace time_zone {
+         boost::mutex& tz_mutex()
+         {
+@@ -422,6 +425,7 @@
+             return boost::exchange(tz_id(), new_id);
+         }
+     } // namespace time_zone
++#endif
+ 
+ }} // namespace boost::locale
+ 
+diff -urEb boost_1_84_0.orig/libs/locale/src/boost/locale/shared/generator.cpp boost_1_84_0/libs/locale/src/boost/locale/shared/generator.cpp
+--- boost_1_84_0.orig/libs/locale/src/boost/locale/shared/generator.cpp	2024-01-24 16:33:34.349801130 +0100
++++ boost_1_84_0/libs/locale/src/boost/locale/shared/generator.cpp	2024-01-24 16:36:33.212167880 +0100
+@@ -7,8 +7,10 @@
+ #include <boost/locale/encoding.hpp>
+ #include <boost/locale/generator.hpp>
+ #include <boost/locale/localization_backend.hpp>
+-#include <boost/thread/locks.hpp>
+-#include <boost/thread/mutex.hpp>
++#if !defined(__EMSCRIPTEN__)
++#  include <boost/thread/locks.hpp>
++#  include <boost/thread/mutex.hpp>
++#endif
+ #include <algorithm>
+ #include <map>
+ #include <vector>
+@@ -21,7 +23,9 @@
+         {}
+ 
+         mutable std::map<std::string, std::locale> cached;
++#if !defined(__EMSCRIPTEN__)
+         mutable boost::mutex cached_lock;
++#endif
+ 
+         category_t cats;
+         char_facet_t chars;
+@@ -101,7 +105,9 @@
+     std::locale generator::generate(const std::locale& base, const std::string& id) const
+     {
+         if(d->caching_enabled) {
++#if !defined(__EMSCRIPTEN__)
+             boost::unique_lock<boost::mutex> guard(d->cached_lock);
++#endif
+             const auto p = d->cached.find(id);
+             if(p != d->cached.end())
+                 return p->second;
+@@ -126,7 +132,9 @@
+                 result = backend->install(result, facet, char_facet_t::nochar);
+         }
+         if(d->caching_enabled) {
++#if !defined(__EMSCRIPTEN__)
+             boost::unique_lock<boost::mutex> guard(d->cached_lock);
++#endif
+             const auto p = d->cached.find(id);
+             if(p == d->cached.end())
+                 d->cached[id] = result;
+diff -urEb boost_1_84_0.orig/libs/locale/src/boost/locale/shared/localization_backend.cpp boost_1_84_0/libs/locale/src/boost/locale/shared/localization_backend.cpp
+--- boost_1_84_0.orig/libs/locale/src/boost/locale/shared/localization_backend.cpp	2024-01-24 16:33:34.349801130 +0100
++++ boost_1_84_0/libs/locale/src/boost/locale/shared/localization_backend.cpp	2024-01-24 16:40:12.134162584 +0100
+@@ -5,8 +5,10 @@
+ // https://www.boost.org/LICENSE_1_0.txt
+ 
+ #include <boost/locale/localization_backend.hpp>
+-#include <boost/thread/locks.hpp>
+-#include <boost/thread/mutex.hpp>
++#if !defined(__EMSCRIPTEN__)
++#  include <boost/thread/locks.hpp>
++#  include <boost/thread/mutex.hpp>
++#endif
+ #include <functional>
+ #include <memory>
+ #include <vector>
+@@ -211,11 +213,13 @@
+             return mgr;
+         }
+ 
++#if !defined(__EMSCRIPTEN__)
+         boost::mutex& localization_backend_manager_mutex()
+         {
+             static boost::mutex the_mutex;
+             return the_mutex;
+         }
++#endif
+         localization_backend_manager& localization_backend_manager_global()
+         {
+             static localization_backend_manager the_manager = make_default_backend_mgr();
+@@ -225,12 +229,16 @@
+ 
+     localization_backend_manager localization_backend_manager::global()
+     {
++#if !defined(__EMSCRIPTEN__)
+         boost::unique_lock<boost::mutex> lock(localization_backend_manager_mutex());
++#endif
+         return localization_backend_manager_global();
+     }
+     localization_backend_manager localization_backend_manager::global(const localization_backend_manager& in)
+     {
++#if !defined(__EMSCRIPTEN__)
+         boost::unique_lock<boost::mutex> lock(localization_backend_manager_mutex());
++#endif
+         return exchange(localization_backend_manager_global(), in);
+     }
+ 
--- a/OrthancFramework/Resources/Patches/curl-7.77.0.patch	Wed Jan 24 15:57:15 2024 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-diff -urEb curl-7.77.0.orig/CMake/Macros.cmake curl-7.77.0/CMake/Macros.cmake
---- curl-7.77.0.orig/CMake/Macros.cmake	2021-06-22 10:31:21.875004553 +0200
-+++ curl-7.77.0/CMake/Macros.cmake	2021-06-22 10:31:45.219024665 +0200
-@@ -59,7 +59,7 @@
-     message(STATUS "Performing Curl Test ${CURL_TEST}")
-     try_compile(${CURL_TEST}
-       ${CMAKE_BINARY_DIR}
--      ${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
-+      ${CURL_SOURCES_DIR}/CMake/CurlTests.c
-       CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
-       "${CURL_TEST_ADD_LIBRARIES}"
-       OUTPUT_VARIABLE OUTPUT)
-diff -urEb curl-7.77.0.orig/lib/vssh/ssh.h curl-7.77.0/lib/vssh/ssh.h
---- curl-7.77.0.orig/lib/vssh/ssh.h	2021-06-22 10:31:21.843004526 +0200
-+++ curl-7.77.0/lib/vssh/ssh.h	2021-06-22 10:36:34.271266232 +0200
-@@ -22,7 +22,7 @@
-  *
-  ***************************************************************************/
- 
--#include "curl_setup.h"
-+#include "../curl_setup.h"
- 
- #if defined(HAVE_LIBSSH2_H)
- #include <libssh2.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancFramework/Resources/Patches/curl-8.5.0.patch	Wed Jan 24 17:32:25 2024 +0100
@@ -0,0 +1,12 @@
+diff -urEb curl-8.5.0.orig/CMake/Macros.cmake curl-8.5.0/CMake/Macros.cmake
+--- curl-8.5.0.orig/CMake/Macros.cmake	2024-01-24 17:21:21.387965189 +0100
++++ curl-8.5.0/CMake/Macros.cmake	2024-01-24 17:21:48.523719072 +0100
+@@ -48,7 +48,7 @@
+     message(STATUS "Performing Curl Test ${CURL_TEST}")
+     try_compile(${CURL_TEST}
+       ${CMAKE_BINARY_DIR}
+-      ${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
++      ${CURL_SOURCES_DIR}/CMake/CurlTests.c
+       CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
+       "${CURL_TEST_ADD_LIBRARIES}"
+       OUTPUT_VARIABLE OUTPUT)
--- a/OrthancFramework/Resources/Patches/openssl-3.1.0.patch	Wed Jan 24 15:57:15 2024 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-diff -urEb openssl-3.1.0.orig/crypto/riscvcap.c openssl-3.1.0/crypto/riscvcap.c
---- openssl-3.1.0.orig/crypto/riscvcap.c	2023-03-14 13:59:07.000000000 +0100
-+++ openssl-3.1.0/crypto/riscvcap.c	2023-04-04 17:18:21.018468423 +0200
-@@ -37,7 +37,8 @@
- 
- static void strtoupper(char *str)
- {
--    for (char *x = str; *x; ++x)
-+    char* x;
-+    for (x = str; *x; ++x)
-         *x = toupper(*x);
- }
- 
-@@ -51,12 +52,13 @@
- {
-     char envstrupper[BUFLEN];
-     char buf[BUFLEN];
-+    size_t i;
- 
-     /* Convert env str to all uppercase */
-     OPENSSL_strlcpy(envstrupper, envstr, sizeof(envstrupper));
-     strtoupper(envstrupper);
- 
--    for (size_t i = 0; i < kRISCVNumCaps; ++i) {
-+    for (i = 0; i < kRISCVNumCaps; ++i) {
-         /* Prefix capability with underscore in preparation for search */
-         BIO_snprintf(buf, BUFLEN, "_%s", RISCV_capabilities[i].name);
-         if (strstr(envstrupper, buf) != NULL) {
-diff -urEb openssl-3.1.0.orig/providers/implementations/rands/seeding/rand_unix.c openssl-3.1.0/providers/implementations/rands/seeding/rand_unix.c
---- openssl-3.1.0.orig/providers/implementations/rands/seeding/rand_unix.c	2023-03-14 13:59:07.000000000 +0100
-+++ openssl-3.1.0/providers/implementations/rands/seeding/rand_unix.c	2023-04-04 17:17:43.874649403 +0200
-@@ -452,6 +452,7 @@
-              * system call and this should always succeed which renders
-              * this alternative but essentially identical source moot.
-              */
-+#if !defined(__LSB_VERSION__)  // "syscall()" is not available in LSB
-             if (uname(&un) == 0) {
-                 kernel[0] = atoi(un.release);
-                 p = strchr(un.release, '.');
-@@ -462,6 +463,7 @@
-                     return 0;
-                 }
-             }
-+#endif
-             /* Open /dev/random and wait for it to be readable */
-             if ((fd = open(DEVRANDOM_WAIT, O_RDONLY)) != -1) {
-                 if (DEVRANDM_WAIT_USE_SELECT && fd < FD_SETSIZE) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancFramework/Resources/Patches/openssl-3.1.4.patch	Wed Jan 24 17:32:25 2024 +0100
@@ -0,0 +1,47 @@
+diff -urEb openssl-3.1.4.orig/crypto/riscvcap.c openssl-3.1.4/crypto/riscvcap.c
+--- openssl-3.1.4.orig/crypto/riscvcap.c	2024-01-24 16:58:48.308108757 +0100
++++ openssl-3.1.4/crypto/riscvcap.c	2024-01-24 17:01:04.114914015 +0100
+@@ -37,7 +37,8 @@
+ 
+ static void strtoupper(char *str)
+ {
+-    for (char *x = str; *x; ++x)
++    char* x;
++    for (x = str; *x; ++x)
+         *x = toupper(*x);
+ }
+ 
+@@ -51,12 +52,13 @@
+ {
+     char envstrupper[BUFLEN];
+     char buf[BUFLEN];
++    size_t i;
+ 
+     /* Convert env str to all uppercase */
+     OPENSSL_strlcpy(envstrupper, envstr, sizeof(envstrupper));
+     strtoupper(envstrupper);
+ 
+-    for (size_t i = 0; i < kRISCVNumCaps; ++i) {
++    for (i = 0; i < kRISCVNumCaps; ++i) {
+         /* Prefix capability with underscore in preparation for search */
+         BIO_snprintf(buf, BUFLEN, "_%s", RISCV_capabilities[i].name);
+         if (strstr(envstrupper, buf) != NULL) {
+diff -urEb openssl-3.1.4.orig/providers/implementations/rands/seeding/rand_unix.c openssl-3.1.4/providers/implementations/rands/seeding/rand_unix.c
+--- openssl-3.1.4.orig/providers/implementations/rands/seeding/rand_unix.c	2024-01-24 16:58:48.332108547 +0100
++++ openssl-3.1.4/providers/implementations/rands/seeding/rand_unix.c	2024-01-24 17:01:30.182683539 +0100
+@@ -452,6 +452,7 @@
+              * system call and this should always succeed which renders
+              * this alternative but essentially identical source moot.
+              */
++#if !defined(__LSB_VERSION__)  // "syscall()" is not available in LSB
+             if (uname(&un) == 0) {
+                 kernel[0] = atoi(un.release);
+                 p = strchr(un.release, '.');
+@@ -462,6 +463,7 @@
+                     return 0;
+                 }
+             }
++#endif
+             /* Open /dev/random and wait for it to be readable */
+             if ((fd = open(DEVRANDOM_WAIT, O_RDONLY)) != -1) {
+                 if (DEVRANDM_WAIT_USE_SELECT && fd < FD_SETSIZE) {
--- a/OrthancFramework/Sources/Logging.cpp	Wed Jan 24 15:57:15 2024 +0100
+++ b/OrthancFramework/Sources/Logging.cpp	Wed Jan 24 17:32:25 2024 +0100
@@ -26,6 +26,7 @@
 
 #include "OrthancException.h"
 
+#include <cassert>
 #include <stdint.h>
 
 
--- a/OrthancServer/UnitTestsSources/VersionsTests.cpp	Wed Jan 24 15:57:15 2024 +0100
+++ b/OrthancServer/UnitTestsSources/VersionsTests.cpp	Wed Jan 24 17:32:25 2024 +0100
@@ -112,14 +112,14 @@
 
 TEST(Versions, BoostStatic)
 {
-  ASSERT_TRUE(std::string(BOOST_LIB_VERSION) == "1_83" ||
+  ASSERT_TRUE(std::string(BOOST_LIB_VERSION) == "1_84" ||
               std::string(BOOST_LIB_VERSION) == "1_69" /* if USE_LEGACY_BOOST */);
 }
 
 TEST(Versions, CurlStatic)
 {
   curl_version_info_data* v = curl_version_info(CURLVERSION_NOW);
-  ASSERT_STREQ("7.77.0", v->version);
+  ASSERT_STREQ("8.5.0", v->version);
 }
 
 TEST(Versions, PngStatic)
@@ -167,11 +167,11 @@
 #if ORTHANC_ENABLE_SSL == 1
 TEST(Version, OpenSslStatic)
 {
-  // openssl-3.1.0
+  // openssl-3.1.4
   // https://www.openssl.org/docs/man3.0/man3/OPENSSL_VERSION_NUMBER.html
   ASSERT_EQ(3 /* major */ * 0x10000000L +
             1 /* minor */ * 0x00100000L +
-            0 /* patch */ * 0x00000010L, OPENSSL_VERSION_NUMBER);
+            4 /* patch */ * 0x00000010L, OPENSSL_VERSION_NUMBER);
 }
 #endif