Skip to content

Feature/optional openssl#62

Merged
lucaromagnoli merged 2 commits intomainfrom
feature/optional-openssl
Sep 30, 2025
Merged

Feature/optional openssl#62
lucaromagnoli merged 2 commits intomainfrom
feature/optional-openssl

Conversation

@lucaromagnoli
Copy link
Owner

@lucaromagnoli lucaromagnoli commented Sep 30, 2025

Note

Makes OpenSSL optional with LLMCPP_USE_OPENSSL; defaults to native SSL (SecureTransport/WinSSL) and updates httplib flags and link settings accordingly.

  • Build/CMake:
    • Add LLMCPP_USE_OPENSSL option; prefer native SSL by default with status messages and fallback if OpenSSL not found.
    • Switch find_package(OpenSSL) to optional (QUIET) and conditional use.
    • Update httplib config: conditionally set HTTPLIB_USE_OPENSSL, HTTPLIB_USE_SECURE_TRANSPORT, HTTPLIB_USE_WINSSL; keep HTTPLIB_USE_ZLIB and HTTPLIB_USE_BROTLI off.
    • Remove unconditional linking to OpenSSL::SSL and OpenSSL::Crypto; rely on platform SSL (CoreFoundation/Security on macOS, WinSSL on Windows) and httplib::httplib.

Written by Cursor Bugbot for commit ecf67ed. This will update automatically on new commits. Configure here.

- macOS: Use SecureTransport (via Security framework)
- Windows: Use WinSSL/Schannel (via crypt32)
- Remove OpenSSL requirement for faster compilation
- Smaller binaries and better OS security integration
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

elseif(WIN32)
set(HTTPLIB_USE_WINSSL ON CACHE BOOL "Use WinSSL on Windows" FORCE)
endif()
endif()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: SSL Configuration Breaks Linux HTTPS Support

The SSL configuration changes introduce two issues. When LLMCPP_USE_OPENSSL is enabled and OpenSSL is found, the required OpenSSL libraries (OpenSSL::SSL, OpenSSL::Crypto) are not linked, causing linker errors. Additionally, on Linux, if LLMCPP_USE_OPENSSL is OFF, httplib lacks an SSL backend since the native SSL fallback only supports macOS and Windows, breaking HTTPS functionality.

Fix in Cursor Fix in Web

@lucaromagnoli lucaromagnoli merged commit afb9247 into main Sep 30, 2025
8 checks passed
@lucaromagnoli lucaromagnoli deleted the feature/optional-openssl branch September 30, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant