From 9613251e9a4529b48a5280979db213170e69cac0 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 22 Oct 2026 10:54:53 +0200 Subject: [PATCH] Hide statically linked OpenSSL symbols from the dynamic symbol table Arrow/Parquet/Thrift (vcpkg) link OpenSSL statically, regardless of gRPC. On Linux these symbols ended up in the dynamic symbol table of the executable and interposed the system OpenSSL loaded by the Qt TLS plugin (and by libssh2/libldap via libcurl). Mixing two OpenSSL versions caused a crash in the TLS handshake, e.g. when pressing Authenticate for Sumo. --- ApplicationExeCode/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ApplicationExeCode/CMakeLists.txt b/ApplicationExeCode/CMakeLists.txt index 92750e078b..5915907992 100644 --- a/ApplicationExeCode/CMakeLists.txt +++ b/ApplicationExeCode/CMakeLists.txt @@ -225,6 +225,16 @@ endif() target_link_libraries(ResInsight PRIVATE ${LINK_LIBRARIES}) +# Arrow/Parquet/Thrift (vcpkg) link OpenSSL statically, independent of gRPC. +# Keep those symbols out of the dynamic symbol table, otherwise they interpose +# the system OpenSSL loaded by the Qt TLS plugin (and by libssh2/libldap via +# libcurl), mixing two OpenSSL versions and crashing during the TLS handshake. +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_options( + ResInsight PRIVATE "LINKER:--exclude-libs,libssl.a:libcrypto.a" + ) +endif() + if(UNIX AND NOT APPLE) target_link_libraries(ResInsight PRIVATE xcb) endif()