Skip to content

Improve support for custom OpenSSL selection#5848

Open
masa-koz wants to merge 2 commits intomicrosoft:mainfrom
masa-koz:masa-koz/custom-openssl
Open

Improve support for custom OpenSSL selection#5848
masa-koz wants to merge 2 commits intomicrosoft:mainfrom
masa-koz:masa-koz/custom-openssl

Conversation

@masa-koz
Copy link
Contributor

@masa-koz masa-koz commented Mar 7, 2026

Description

This pull request introduces improved support for building with an external OpenSSL installation, primarily by adding a new openssl_external feature and enhancing the build system to handle more flexible OpenSSL configuration. The changes affect CMake configuration, Rust feature flags, and build scripts to better support both static and shared linking, and to allow specifying OpenSSL paths via environment variables.

Build system and CMake improvements:

  • Added a new CMake cache variable QUIC_OPENSSL_ROOT_DIR to allow specifying the OpenSSL root directory, and updated OpenSSL selection logic to support this variable for both static and shared builds. [1] [2]
  • Enhanced the CMake logic to properly select between static and shared OpenSSL libraries based on the BUILD_SHARED_LIBS flag, and improved handling of imported OpenSSL targets to avoid duplicate dependency linking.

Rust feature and build script updates:

  • Introduced a new Cargo feature openssl_external for building with an external OpenSSL, and updated the build script (scripts/build.rs) to configure CMake accordingly by passing the appropriate variables from environment variables if set. [1] [2]
  • Adjusted the output directory logic in the build script to use lib on Windows and artifacts elsewhere, improving compatibility with different platforms.

Test and platform compatibility:

  • Updated test logic in src/rs/config.rs to recognize the new openssl_external feature when determining which TLS provider is active on Windows.

Testing

No

Documentation

TBD

@masa-koz masa-koz requested a review from a team as a code owner March 7, 2026 10:37
@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.89%. Comparing base (45a46f3) to head (807eadc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5848      +/-   ##
==========================================
- Coverage   86.30%   84.89%   -1.41%     
==========================================
  Files          60       60              
  Lines       18732    18732              
==========================================
- Hits        16167    15903     -264     
- Misses       2565     2829     +264     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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