feat(tls): add opt-in ex_ssl 0.4 with verified TLS 1.2 and 1.3 - #14
Merged
Merged
Conversation
Keep OTP :ssl as the default while supporting :ex_ssl for fetch, WebSocket, and EventSource TLS connections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Behavior
Add explicitly selectable
:ex_sslTLS to Fetch, HTTP/1.1, HTTP/2, WebSocket and EventSource. OTP:sslremains the default. Backend selection survives redirects and reconnects, with no automatic fallback or replay of uncertain request bytes. HTTP/3 and WebTransport retain their QUIC implementation.Use published ex_ssl 0.4.0 (
~> 0.4.0, locked to 0.4.0). The adapter supports verified TLS 1.3 and explicitly configured TLS 1.2, validated client identities, ordered algorithm preferences, and an explicit TCP-option allowlist. Client identities stay bound to their original redirect origin. TLS 1.3 automatic ticket resumption is opt-in and preserves trust/profile/ALPN isolation. Unsupported options fail explicitly.Correctness and packaging
Preserve complete HTTP/2 early responses when optional control writes encounter authenticated peer closure, including responses spanning TLS records and post-completion NO_ERROR resets. Success still requires END_STREAM, complete headers, valid Content-Length and bounded framing. Stop pending upload DATA at response completion. Truncation, required-write failures, cancellation and deadlines remain errors.
Run child app suites through the umbrella root and verify all five built packages in a fresh external consumer with transitive dependency resolution. Deterministic regressions use explicit peer/message barriers. TLS 1.2 large-response tests hold the reference peer until the entire response is read; separate Phase 0 tests continue to exercise close-before-control-write behavior.
Validation
docs/pr-14-validation.md.Compatibility boundaries and historical evidence are documented in
docs/ex-ssl-consumer-contract.md,docs/pr-14-validation.md, and the ex_ssl cross-repository progress ledger. This does not claim full OTP parity or a completed human security review. TLS 1.2 resumption, mTLS resumption and 0-RTT remain unsupported.