-
Notifications
You must be signed in to change notification settings - Fork 747
test(integration): add mTLS integration tests #5638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bindings/rust/extended/s2n-tls/src/callbacks/cert_validation.rs
Outdated
Show resolved
Hide resolved
bindings/rust/extended/s2n-tls/src/callbacks/cert_validation.rs
Outdated
Show resolved
Hide resolved
|
@jmayclin @maddeleine For async cert validation, instead of extending the Rust public API, the integration tests now register an async cert validation callback directly via s2n_tls_sys::s2n_config_set_cert_validation_cb. The tests define a C-style callback (test_async_cert_cb) and a small context struct that tracks invocation count and sends the s2n_cert_validation_info* over a channel. The async tests then call s2n_cert_validation_accept on that pointer to resume the handshake. This lets us exercise the async cert validation path end-to-end without exposing any new async Rust API surface. |
Co-authored-by: James Mayclin <[email protected]>
Goal
Add mTLS integration tests for certificate-validation callbacks that exercise both synchronous and asynchronous validation across TLS versions and implementations, without changing the public Rust callback API. (This PR adds Rustls↔s2n coverage; additional libraries will be added in follow-up work.)
Why
The existing Rust bindings only supported synchronous certificate validation. We still need async coverage to match the C API and to ensure regression coverage for real-world mTLS deployments. Adding these integration tests gives us the missing end-to-end mTLS coverage required to detect changes in cert-validation behavior with different peers and protocol versions.
How
'staticbound blocks async interfaces #5469 is resolved.Callouts
Testing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.