Skip to content

Add DTLS cipher suite configuration to RtcConfig#925

Open
algesten wants to merge 3 commits intomainfrom
dtls-cipher-suite-config
Open

Add DTLS cipher suite configuration to RtcConfig#925
algesten wants to merge 3 commits intomainfrom
dtls-cipher-suite-config

Conversation

@algesten
Copy link
Copy Markdown
Owner

Summary

  • Add Dtls12CipherSuite and Dtls13CipherSuite enums (provider-agnostic, defined in str0m-proto)
  • Add DtlsConfig struct bundling DTLS version + optional cipher suite allow-lists
  • Add RtcConfig::set_dtls12_cipher_suites() and set_dtls13_cipher_suites() methods
  • Update DtlsProvider::new_dtls() trait method to accept &DtlsConfig
  • All 5 dimpl backends forward cipher preferences to dimpl's Config builder
  • Native backends (OpenSSL, SChannel) accept but ignore cipher suite fields

Existing set_dtls_version() / dtls_version() continue to work, delegating to the DtlsConfig struct.

Test plan

  • cargo check passes
  • cargo test passes (all 56 tests)
  • cargo test --test handshake-direct passes (all 9 handshake tests)
  • Test with restricted cipher suites in a real handshake scenario

Generated with Claude Code

algesten and others added 3 commits March 28, 2026 08:48
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>
@xnorpx
Copy link
Copy Markdown
Collaborator

xnorpx commented Mar 29, 2026

@algesten I don't think we need this now when we can disable cryptos with the feature flags. (But others might want it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants