From: Adrien Gallouët Date: Wed, 21 Jan 2026 16:58:38 +0000 (+0100) Subject: common : improve error message when HTTPS is missing but required (#18987) X-Git-Tag: upstream/0.0.8067~273 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=14be5a39b1286fc514efd19119c8f1c2e545634f;p=pkg%2Fggml%2Fsources%2Fllama.cpp common : improve error message when HTTPS is missing but required (#18987) Signed-off-by: Adrien Gallouët --- diff --git a/common/http.h b/common/http.h index 8e29787dc..7c683aafc 100644 --- a/common/http.h +++ b/common/http.h @@ -57,6 +57,17 @@ static std::pair common_http_client(const std: throw std::runtime_error("error: invalid URL format"); } +#ifndef CPPHTTPLIB_OPENSSL_SUPPORT + if (parts.scheme == "https") { + throw std::runtime_error( + "HTTPS is not supported. Please rebuild with:\n" + " -DLLAMA_BUILD_BORINGSSL=ON\n" + " -DLLAMA_BUILD_LIBRESSL=ON\n" + "or ensure dev files of an OpenSSL-compatible library are available when building." + ); + } +#endif + httplib::Client cli(parts.scheme + "://" + parts.host); if (!parts.user.empty()) { diff --git a/vendor/cpp-httplib/CMakeLists.txt b/vendor/cpp-httplib/CMakeLists.txt index 172b92545..3d938d9f3 100644 --- a/vendor/cpp-httplib/CMakeLists.txt +++ b/vendor/cpp-httplib/CMakeLists.txt @@ -142,7 +142,7 @@ elseif (LLAMA_OPENSSL) target_link_libraries(${TARGET} PUBLIC OpenSSL::SSL OpenSSL::Crypto) endif() else() - message(STATUS "OpenSSL not found, SSL support disabled") + message(WARNING "OpenSSL not found, HTTPS support disabled") endif() endif()