CDRIVER-6071 replace build-and-test-with-toolchain with openssl-compat #2082
+2,410
−8,031
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves CDRIVER-6071. Removes dependency on the legacy C toolchain project by replacing the
build-and-test-with-toolchain
task (which began inexplicably failing since 2025-07-17; did the artifact expire?) with a newopenssl-compat
matrix.Historically, the legacy C toolchain project was meant to test both SSL library compatibility and build tool minimum requirements, as currently documented by its README:
However, its purpose has long been made obsolete or superseded by better alternatives. Support for LibreSSL was dropped in CDRIVER-5693. Boost is irrelevant (C++ Driver doesn't support it since CXX-2797, nor does it use the legacy C toolchain anyways). The minimum required CMake version was raised to 3.15 in CDRIVER-4637 (a new branch as created by https://github.com/10gen/mongo-c-toolchain/pull/2 to support this new requirement); this can easily be replaced with a
cmake-compat
matrix (+ soon powered byuvx cmake
instead offind-cmake-latest.sh
). The legacy C toolchain also provides zstd, but AFAICT we do not actually test this minimum zstd compatibility requirement, or any other external library dependency's minimum version requirements (we can consider adding additional tasks to accomplish this if needed).Therefore, the only value (that was) being provided by the
build-and-test-with-toolchain
task is OpenSSL library compatibility checks, which is worth preserving given the wide variety of OpenSSL library versions across platforms and distros. This PR proposes preserving and refining this compatibility coverage as the newopenssl-compat
matrix.First, it is important to note, per OpenSSL docs:
The versions "present above" are currently 3.0 through 3.5. This means we can/should drop compatibility coverage for any version older than 3.0 that is not either 1.0.2 and 1.1.1. Relative to the legacy C toolchain, this means dropping 0.9.8, 1.0.1, and 1.1.0.
Note
The results of an EVG distro survey on 2025-08-05 report the following distros which are currently used by the C Driver that do not have provide OpenSSL v3 or newer via default system packages:
amazon2-arm64-latest
: 1.0.2k FIPSdebian-11
: 1.1.1nrhel7-latest
: 1.0.2k FIPSrhel8-latest
: 1.1.1k FIPSrhel8-power
: 1.1.1k FIPSrhel8-zseries
: 1.1.1k FIPSrhel80
: 1.1.1 FIPSrhel84
: 1.1.1g FIPSrhel94
: 1.1.1g FIPSubuntu2004
: 1.1.1fubuntu2004-arm64
: 1.1.1fThese results support the argument for compatibility-checking pre-v3 OpenSSL versions 1.0.2 and 1.1.1 only.
Furthermore, per docs:
Given we have plenty of OpenSSL coverage with other compile-and-test matrices, I believe we do not need to extend compatibility checks for pre-v3 OpenSSL versions more than we already have. That being said, all "special" OpenSSL-related tasks have been relocated from their prior build variants into the
openssl-compat
matrix: all remaining-openssl
tasks simply use the system-provided OpenSSL library as-is without any special steps.That being said, even though some system-provided OpenSSL libraries are FIPS-validated, this doesn't necessarily mean the FIPS module is enabled and used by default. Therefore, the
openssl-compat
matrix includes a few custom OpenSSL installations that do set the appropriateopenssl.cnf
properties to use the FIPS module by default. (That being said, does mongoc even use the FIPS module programmatically at all?) For now, only 3.0.9 and 3.1.2 are used for FIPS 140-2 and FIPS 140-3 coverage respectively (each being the latest patch release for its minor version series).Important
This PR deliberately drops OpenSSL FIPS Object Module 2.0 integration checks. OpenSSL 3.0.9 already provides FIPS 140-2 compliance coverage. Per Wikipedia, "The FIPS Object Module 2.0 remained FIPS 140-2 validated in several formats until September 1, 2020, when NIST ... designated all non-compliant modules as 'Historical'. This designation includes a caution to federal agencies that they should not include the module in any new procurements." Aside from the distros listed in the survey above which provide FIPS support, I do not think we need to go out of our way to test this any longer.
The Ubuntu 24.04 distro is selected for the
openssl-compat
matrix primarily to avoid complications with registering trusted certificates with the custom OpenSSL installation on RHEL or Arch Linux (no special handling seems to be required on Ubuntu). RHEL is also complicated due to backports ofEVP_KDF_*
functions into their OpenSSL 1.1.1 package and depending on it (e.g. bylibk5crypto.so.3
). Since the goal of this matrix is OpenSSL version compatibility checks, platform-specific OpenSSL compatibility is deferred to other existing-openssl
tasks.The
openssl-compat
matrix tasks also call therun-auth-tests.sh
script via therun auth tests
EVG command to extend compatibility checks to runtime behavior, not just compile-time compatibility as is the case forbuild-and-test-with-toolchain
. This should hopefully allow us to detect issues like CDRIVER-5998 a bit better than before.Numerous fixes and improvements are made to authentication-related tasks and scripts:
authentication-*
andocsp-*
task failures due to updated CMake binary directory paths.test-aws-*
scripts for consistency.atlas_x509_*
Evergreen project variables required byrun-auth-tests.sh
have been moved into the EVG project repository settings so they are inherited by ther2.1
release branch.tlsDisableOCSPEndpointCheck
URI option is rejected by both Secure Transport (darwinssl) and Secure Channel (winssl), but neither of these behaviors seems to be publically documented.