Add DTLS cipher suite configuration to RtcConfig#925
Open
Conversation
Allow users to restrict which DTLS 1.2 and 1.3 cipher suites are offered and accepted during the handshake, via new RtcConfig methods set_dtls12_cipher_suites() and set_dtls13_cipher_suites(). Introduces provider-agnostic Dtls12CipherSuite and Dtls13CipherSuite enums in str0m-proto, a DtlsConfig struct bundling version + cipher preferences, and updates DtlsProvider::new_dtls() to accept &DtlsConfig. All five dimpl backends forward the allow-lists to dimpl Config builder; native backends (OpenSSL, SChannel) accept but ignore cipher preferences. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
|
@algesten I don't think we need this now when we can disable cryptos with the feature flags. (But others might want it) |
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.
Summary
Dtls12CipherSuiteandDtls13CipherSuiteenums (provider-agnostic, defined in str0m-proto)DtlsConfigstruct bundling DTLS version + optional cipher suite allow-listsRtcConfig::set_dtls12_cipher_suites()andset_dtls13_cipher_suites()methodsDtlsProvider::new_dtls()trait method to accept&DtlsConfigConfigbuilderExisting
set_dtls_version()/dtls_version()continue to work, delegating to theDtlsConfigstruct.Test plan
cargo checkpassescargo testpasses (all 56 tests)cargo test --test handshake-directpasses (all 9 handshake tests)Generated with Claude Code