feat(s2n-quic): allow s2n-quic to use s2n-tls on Windows with MinGW - #3153
Conversation
e058981 to
8043cb9
Compare
8043cb9 to
d1be919
Compare
f8da821 to
7fe6cc3
Compare
|
Do we have a user who we think will pick up this feature? I'm glad to know this works, but I'm just not really sure what the usecase is here. Is there someone right now who is waiting to s2n-quic with s2n-tls as a backend on mingw? This wasn't in the original issue(aws/s2n-tls#4018) so I'm not sure why we're pushing for it. |
|
Can you check the existing |
fc558df to
bd58e6b
Compare
|
@WesleyRosenblum Yes, we should reuse the existing |
* reuse existing feature provider-tls-s2n * temp disable provider-tls-default * exclude crates that depends on s2n-quic * revert changes for tls::default
bd58e6b to
ee7eb33
Compare
* Adding a build.rs in s2n-quic-tests to consolidate platform detections
06faacf to
2d8b5cc
Compare
* explicitly set stable * add comments to specify why we need explicitly use tls
|
I will make s2n-quic running on Windows GNU/MinGW toolchain to use s2n-tls as its backend TLS provider by default. |
9767f83 to
fb48970
Compare
Release Summary:
Allow s2n-quic to build and tests with s2n-tls on Windows as its TLS backend. s2n-quic running on Windows GNU/MinGW toolchain to use s2n-tls as its backend TLS provider by default.
Resolved issues:
related to aws/s2n-tls#4018
Description of changes:
s2n-tls v0.3.40 allows s2n-tls to work on Windows with MinGW toolchain. This PR allows s2n-quic to use s2n-tls as its TLS backend with MinGW toolchain.
The user use
provider-tls-s2nandprovider-tls-rustlsto override TLS backend with either s2n-tls or rustls. If those features are not enabled, then Rustls is the default TLS backend for Windows and s2n-tls is default for Unix and Linux. See changes in https://github.com/aws/s2n-quic/pull/3153/changes#diff-6b8d5705ae18f0ed58dd7a327da48d641287fbc8739baeabb146f734d1e6b16a for details.New build.rs + s2n_tls_provider / boringssl cfgs. This PR adds a build script to s2n-quic-tests that evaluates the target once and emits two named cfgs describing which optional dependency is available rather than which platform we're on. s2n_tls_provider replaces the any(unix, all(target_os = "windows", target_env = "gnu")) predicate that had been copy-pasted across 10 sites, and boringssl replaces the quiche gate not(all(target_os = "windows", not(target_env = "msvc"))). The gates now read as intent ("this test needs s2n-tls") instead of a platform matrix, and there's a single source of truth to update if the support surface ever changes. The build script also registers both names via cargo::rustc-check-cfg so the unexpected_cfgs lint stays quiet under -D warnings.
Call-outs:
The default TLS provider:
Testing:
I added a new job in ci.yml to run all tests for MinGW Windows: https://github.com/aws/s2n-quic/actions/runs/29284288996/job/86932902570?pr=3153.
The CI set up is very similar to the one that I added for s2n-tls: https://github.com/aws/s2n-tls/blob/main/.github/workflows/ci_windows.yml.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.