changeset 6449:0863ebc016e1

updated libcurl to 8.17.0
author Alain Mazy <am@orthanc.team>
date Wed, 19 Nov 2025 11:49:21 +0100
parents 78c09f68c29c
children fde2085c4024
files NEWS OrthancFramework/Resources/CMake/LibCurlConfiguration.cmake OrthancFramework/Resources/Patches/curl-8.12.1.patch OrthancFramework/Resources/Patches/curl-8.17.0.patch OrthancServer/UnitTestsSources/VersionsTests.cpp
diffstat 5 files changed, 97 insertions(+), 89 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Wed Nov 19 11:28:59 2025 +0100
+++ b/NEWS	Wed Nov 19 11:49:21 2025 +0100
@@ -51,6 +51,7 @@
   - civetweb 1.16, including patch for CVE-2025-55763
   - SQLite 3.50.4
   - libpng 1.6.50
+  - curl 8.17.0
 
 
 Version 1.12.9 (2025-08-11)
--- a/OrthancFramework/Resources/CMake/LibCurlConfiguration.cmake	Wed Nov 19 11:28:59 2025 +0100
+++ b/OrthancFramework/Resources/CMake/LibCurlConfiguration.cmake	Wed Nov 19 11:49:21 2025 +0100
@@ -21,9 +21,9 @@
 
 
 if (STATIC_BUILD OR NOT USE_SYSTEM_CURL)
-  SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-8.9.0)
-  SET(CURL_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/curl-8.9.0.tar.gz")
-  SET(CURL_MD5 "f9bca5d4d5bac1f04e6c5eb4d0418618")
+  SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-8.17.0)
+  SET(CURL_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/curl-8.17.0.tar.gz")
+  SET(CURL_MD5 "71e24b00f40a7503c1d07886e42d6305")
 
   if (IS_DIRECTORY "${CURL_SOURCES_DIR}")
     set(FirstRun OFF)
@@ -36,7 +36,7 @@
   if (FirstRun)
     execute_process(
       COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
-      ${CMAKE_CURRENT_LIST_DIR}/../Patches/curl-8.9.0.patch
+      ${CMAKE_CURRENT_LIST_DIR}/../Patches/curl-8.17.0.patch
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
       RESULT_VARIABLE Failure
       )
@@ -55,6 +55,7 @@
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vssh CURL_SOURCES)
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vtls CURL_SOURCES)
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vquic CURL_SOURCES)
+  AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/curlx CURL_SOURCES)
   source_group(ThirdParty\\LibCurl REGULAR_EXPRESSION ${CURL_SOURCES_DIR}/.*)
 
   add_definitions(
@@ -116,79 +117,85 @@
       SOURCE ${CURL_SOURCES} APPEND
       PROPERTY COMPILE_DEFINITIONS "HAVE_CONFIG_H=1;OS=\"${TMP_OS}\""
       )
-   
+
+    if(CMAKE_C_COMPILER_TARGET)
+      set(CURL_OS "\"${CMAKE_C_COMPILER_TARGET}\"")
+    else()
+      set(CURL_OS "\"${CMAKE_SYSTEM_NAME}\"")
+    endif()
+
     include(${CURL_SOURCES_DIR}/CMake/Macros.cmake)
 
-    # WARNING: Do *not* reorder the "check_include_file_concat()" below!
-    check_include_file_concat("stdio.h"          HAVE_STDIO_H)
-    check_include_file_concat("inttypes.h"       HAVE_INTTYPES_H)
-    check_include_file_concat("sys/filio.h"      HAVE_SYS_FILIO_H)
-    check_include_file_concat("sys/ioctl.h"      HAVE_SYS_IOCTL_H)
-    check_include_file_concat("sys/param.h"      HAVE_SYS_PARAM_H)
-    check_include_file_concat("sys/poll.h"       HAVE_SYS_POLL_H)
-    check_include_file_concat("sys/resource.h"   HAVE_SYS_RESOURCE_H)
-    check_include_file_concat("sys/select.h"     HAVE_SYS_SELECT_H)
-    check_include_file_concat("sys/socket.h"     HAVE_SYS_SOCKET_H)
-    check_include_file_concat("sys/sockio.h"     HAVE_SYS_SOCKIO_H)
-    check_include_file_concat("sys/stat.h"       HAVE_SYS_STAT_H)
-    check_include_file_concat("sys/time.h"       HAVE_SYS_TIME_H)
-    check_include_file_concat("sys/types.h"      HAVE_SYS_TYPES_H)
-    check_include_file_concat("sys/uio.h"        HAVE_SYS_UIO_H)
-    check_include_file_concat("sys/un.h"         HAVE_SYS_UN_H)
-    check_include_file_concat("sys/utime.h"      HAVE_SYS_UTIME_H)
-    check_include_file_concat("sys/xattr.h"      HAVE_SYS_XATTR_H)
-    check_include_file_concat("alloca.h"         HAVE_ALLOCA_H)
-    check_include_file_concat("arpa/inet.h"      HAVE_ARPA_INET_H)
-    check_include_file_concat("arpa/tftp.h"      HAVE_ARPA_TFTP_H)
-    check_include_file_concat("assert.h"         HAVE_ASSERT_H)
-    check_include_file_concat("crypto.h"         HAVE_CRYPTO_H)
-    check_include_file_concat("des.h"            HAVE_DES_H)
-    check_include_file_concat("err.h"            HAVE_ERR_H)
-    check_include_file_concat("errno.h"          HAVE_ERRNO_H)
-    check_include_file_concat("fcntl.h"          HAVE_FCNTL_H)
-    check_include_file_concat("idn2.h"           HAVE_IDN2_H)
-    check_include_file_concat("ifaddrs.h"        HAVE_IFADDRS_H)
-    check_include_file_concat("io.h"             HAVE_IO_H)
-    check_include_file_concat("krb.h"            HAVE_KRB_H)
-    check_include_file_concat("libgen.h"         HAVE_LIBGEN_H)
-    check_include_file_concat("limits.h"         HAVE_LIMITS_H)
-    check_include_file_concat("locale.h"         HAVE_LOCALE_H)
-    check_include_file_concat("net/if.h"         HAVE_NET_IF_H)
-    check_include_file_concat("netdb.h"          HAVE_NETDB_H)
-    check_include_file_concat("netinet/in.h"     HAVE_NETINET_IN_H)
-    check_include_file_concat("netinet/tcp.h"    HAVE_NETINET_TCP_H)
+    # WARNING: Do *not* reorder the "check_include_file_concat_curl()" below!
+    check_include_file_concat_curl("stdio.h"          HAVE_STDIO_H)
+    check_include_file_concat_curl("inttypes.h"       HAVE_INTTYPES_H)
+    check_include_file_concat_curl("sys/filio.h"      HAVE_SYS_FILIO_H)
+    check_include_file_concat_curl("sys/ioctl.h"      HAVE_SYS_IOCTL_H)
+    check_include_file_concat_curl("sys/param.h"      HAVE_SYS_PARAM_H)
+    check_include_file_concat_curl("sys/poll.h"       HAVE_SYS_POLL_H)
+    check_include_file_concat_curl("sys/resource.h"   HAVE_SYS_RESOURCE_H)
+    check_include_file_concat_curl("sys/select.h"     HAVE_SYS_SELECT_H)
+    check_include_file_concat_curl("sys/socket.h"     HAVE_SYS_SOCKET_H)
+    check_include_file_concat_curl("sys/sockio.h"     HAVE_SYS_SOCKIO_H)
+    check_include_file_concat_curl("sys/stat.h"       HAVE_SYS_STAT_H)
+    check_include_file_concat_curl("sys/time.h"       HAVE_SYS_TIME_H)
+    check_include_file_concat_curl("sys/types.h"      HAVE_SYS_TYPES_H)
+    check_include_file_concat_curl("sys/uio.h"        HAVE_SYS_UIO_H)
+    check_include_file_concat_curl("sys/un.h"         HAVE_SYS_UN_H)
+    check_include_file_concat_curl("sys/utime.h"      HAVE_SYS_UTIME_H)
+    check_include_file_concat_curl("sys/xattr.h"      HAVE_SYS_XATTR_H)
+    check_include_file_concat_curl("alloca.h"         HAVE_ALLOCA_H)
+    check_include_file_concat_curl("arpa/inet.h"      HAVE_ARPA_INET_H)
+    check_include_file_concat_curl("arpa/tftp.h"      HAVE_ARPA_TFTP_H)
+    check_include_file_concat_curl("assert.h"         HAVE_ASSERT_H)
+    check_include_file_concat_curl("crypto.h"         HAVE_CRYPTO_H)
+    check_include_file_concat_curl("des.h"            HAVE_DES_H)
+    check_include_file_concat_curl("err.h"            HAVE_ERR_H)
+    check_include_file_concat_curl("errno.h"          HAVE_ERRNO_H)
+    check_include_file_concat_curl("fcntl.h"          HAVE_FCNTL_H)
+    check_include_file_concat_curl("idn2.h"           HAVE_IDN2_H)
+    check_include_file_concat_curl("ifaddrs.h"        HAVE_IFADDRS_H)
+    check_include_file_concat_curl("io.h"             HAVE_IO_H)
+    check_include_file_concat_curl("krb.h"            HAVE_KRB_H)
+    check_include_file_concat_curl("libgen.h"         HAVE_LIBGEN_H)
+    check_include_file_concat_curl("limits.h"         HAVE_LIMITS_H)
+    check_include_file_concat_curl("locale.h"         HAVE_LOCALE_H)
+    check_include_file_concat_curl("net/if.h"         HAVE_NET_IF_H)
+    check_include_file_concat_curl("netdb.h"          HAVE_NETDB_H)
+    check_include_file_concat_curl("netinet/in.h"     HAVE_NETINET_IN_H)
+    check_include_file_concat_curl("netinet/tcp.h"    HAVE_NETINET_TCP_H)
 
-    check_include_file_concat("pem.h"            HAVE_PEM_H)
-    check_include_file_concat("poll.h"           HAVE_POLL_H)
-    check_include_file_concat("pwd.h"            HAVE_PWD_H)
-    check_include_file_concat("rsa.h"            HAVE_RSA_H)
-    check_include_file_concat("setjmp.h"         HAVE_SETJMP_H)
-    check_include_file_concat("sgtty.h"          HAVE_SGTTY_H)
-    check_include_file_concat("signal.h"         HAVE_SIGNAL_H)
-    check_include_file_concat("ssl.h"            HAVE_SSL_H)
-    check_include_file_concat("stdbool.h"        HAVE_STDBOOL_H)
-    check_include_file_concat("stdint.h"         HAVE_STDINT_H)
-    check_include_file_concat("stdio.h"          HAVE_STDIO_H)
-    check_include_file_concat("stdlib.h"         HAVE_STDLIB_H)
-    check_include_file_concat("string.h"         HAVE_STRING_H)
-    check_include_file_concat("strings.h"        HAVE_STRINGS_H)
-    check_include_file_concat("stropts.h"        HAVE_STROPTS_H)
-    check_include_file_concat("termio.h"         HAVE_TERMIO_H)
-    check_include_file_concat("termios.h"        HAVE_TERMIOS_H)
-    check_include_file_concat("time.h"           HAVE_TIME_H)
-    check_include_file_concat("unistd.h"         HAVE_UNISTD_H)
-    check_include_file_concat("utime.h"          HAVE_UTIME_H)
-    check_include_file_concat("x509.h"           HAVE_X509_H)
+    check_include_file_concat_curl("pem.h"            HAVE_PEM_H)
+    check_include_file_concat_curl("poll.h"           HAVE_POLL_H)
+    check_include_file_concat_curl("pwd.h"            HAVE_PWD_H)
+    check_include_file_concat_curl("rsa.h"            HAVE_RSA_H)
+    check_include_file_concat_curl("setjmp.h"         HAVE_SETJMP_H)
+    check_include_file_concat_curl("sgtty.h"          HAVE_SGTTY_H)
+    check_include_file_concat_curl("signal.h"         HAVE_SIGNAL_H)
+    check_include_file_concat_curl("ssl.h"            HAVE_SSL_H)
+    check_include_file_concat_curl("stdbool.h"        HAVE_STDBOOL_H)
+    check_include_file_concat_curl("stdint.h"         HAVE_STDINT_H)
+    check_include_file_concat_curl("stdio.h"          HAVE_STDIO_H)
+    check_include_file_concat_curl("stdlib.h"         HAVE_STDLIB_H)
+    check_include_file_concat_curl("string.h"         HAVE_STRING_H)
+    check_include_file_concat_curl("strings.h"        HAVE_STRINGS_H)
+    check_include_file_concat_curl("stropts.h"        HAVE_STROPTS_H)
+    check_include_file_concat_curl("termio.h"         HAVE_TERMIO_H)
+    check_include_file_concat_curl("termios.h"        HAVE_TERMIOS_H)
+    check_include_file_concat_curl("time.h"           HAVE_TIME_H)
+    check_include_file_concat_curl("unistd.h"         HAVE_UNISTD_H)
+    check_include_file_concat_curl("utime.h"          HAVE_UTIME_H)
+    check_include_file_concat_curl("x509.h"           HAVE_X509_H)
 
-    check_include_file_concat("process.h"        HAVE_PROCESS_H)
-    check_include_file_concat("stddef.h"         HAVE_STDDEF_H)
-    check_include_file_concat("dlfcn.h"          HAVE_DLFCN_H)
-    check_include_file_concat("malloc.h"         HAVE_MALLOC_H)
-    check_include_file_concat("memory.h"         HAVE_MEMORY_H)
-    check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
-    check_include_file_concat("stdint.h"        HAVE_STDINT_H)
-    check_include_file_concat("sockio.h"        HAVE_SOCKIO_H)
-    check_include_file_concat("sys/utsname.h"   HAVE_SYS_UTSNAME_H)
+    check_include_file_concat_curl("process.h"        HAVE_PROCESS_H)
+    check_include_file_concat_curl("stddef.h"         HAVE_STDDEF_H)
+    check_include_file_concat_curl("dlfcn.h"          HAVE_DLFCN_H)
+    check_include_file_concat_curl("malloc.h"         HAVE_MALLOC_H)
+    check_include_file_concat_curl("memory.h"         HAVE_MEMORY_H)
+    check_include_file_concat_curl("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
+    check_include_file_concat_curl("stdint.h"        HAVE_STDINT_H)
+    check_include_file_concat_curl("sockio.h"        HAVE_SOCKIO_H)
+    check_include_file_concat_curl("sys/utsname.h"   HAVE_SYS_UTSNAME_H)
 
     check_type_size("size_t"  SIZEOF_SIZE_T)
     check_type_size("ssize_t"  SIZEOF_SSIZE_T)
@@ -281,7 +288,7 @@
     check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME)
     check_function_exists(gethostname HAVE_GETHOSTNAME)
 
-    check_include_file_concat("pthread.h" HAVE_PTHREAD_H)
+    check_include_file_concat_curl("pthread.h" HAVE_PTHREAD_H)
     check_symbol_exists(recv "sys/socket.h" HAVE_RECV)
     check_symbol_exists(send "sys/socket.h" HAVE_SEND)
 
--- a/OrthancFramework/Resources/Patches/curl-8.12.1.patch	Wed Nov 19 11:28:59 2025 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-diff -urEb curl-8.12.1-orig/CMake/Macros.cmake curl-8.12.1/CMake/Macros.cmake
---- curl-8.12.1-orig/CMake/Macros.cmake 2025-02-13 08:15:00.000000000 +0100
-+++ curl-8.12.1/CMake/Macros.cmake      2025-03-27 10:25:42.119275658 +0100
-@@ -50,7 +50,7 @@
-     message(STATUS "Performing Test ${_curl_test}")
-     try_compile(${_curl_test}
-       ${PROJECT_BINARY_DIR}
--      "${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c"
-+      "${CURL_SOURCES_DIR}/CMake/CurlTests.c"
-       CMAKE_FLAGS
-         "-DCOMPILE_DEFINITIONS:STRING=-D${_curl_test} ${CURL_TEST_DEFINES} ${_cmake_required_definitions}"
-         "${_curl_test_add_libraries}"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancFramework/Resources/Patches/curl-8.17.0.patch	Wed Nov 19 11:49:21 2025 +0100
@@ -0,0 +1,12 @@
+diff -urEb curl-8.17.0-orig/CMake/Macros.cmake curl-8.17.0/CMake/Macros.cmake
+--- curl-8.17.0-orig/CMake/Macros.cmake	2025-11-19 10:41:00.404885652 +0100
++++ curl-8.17.0/CMake/Macros.cmake	2025-11-19 10:42:01.556360886 +0100
+@@ -50,7 +50,7 @@
+     message(STATUS "Performing Test ${_curl_test}")
+     try_compile(${_curl_test}
+       ${PROJECT_BINARY_DIR}
+-      "${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c"
++      "${CURL_SOURCES_DIR}/CMake/CurlTests.c"
+       CMAKE_FLAGS
+         "-DCOMPILE_DEFINITIONS:STRING=-D${_curl_test} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS} ${_cmake_required_definitions}"
+         "${_curl_test_add_libraries}"
--- a/OrthancServer/UnitTestsSources/VersionsTests.cpp	Wed Nov 19 11:28:59 2025 +0100
+++ b/OrthancServer/UnitTestsSources/VersionsTests.cpp	Wed Nov 19 11:49:21 2025 +0100
@@ -120,13 +120,13 @@
 TEST(Versions, CurlStatic)
 {
   curl_version_info_data* v = curl_version_info(CURLVERSION_NOW);
-  ASSERT_STREQ("8.9.0", v->version);
+  ASSERT_STREQ("8.17.0", v->version);
 }
 
 TEST(Versions, PngStatic)
 {
-  ASSERT_EQ(10640u, png_access_version_number());
-  ASSERT_STREQ("1.6.40", PNG_LIBPNG_VER_STRING);
+  ASSERT_EQ(10650u, png_access_version_number());
+  ASSERT_STREQ("1.6.50", PNG_LIBPNG_VER_STRING);
 }
 
 TEST(Versions, JpegStatic)