dimpl: configurable SRTP profile order

A DTLS 1.2 server in dimpl picks AES-256-GCM whenever the client offers it,
and there is no setting. Our str0m peers are the DTLS server for official
TeamSpeak 6 viewers, which offer all profiles, so our streams used GCM while
official streams use AES_CM_128_HMAC_SHA1_80.

ConfigBuilder::srtp_profiles sets the profiles in order of preference: the
server picks the first of them the client offered, clients offer them in
that order and reject a server that picks another. Unset, everything is as
upstream. VOELIN-PATCH.md describes the patch and how to drop it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
Claude committed 2026-09-26 23:36:41 +00:00
1 parent ce7c833aa8
commit 37d52bc604
14 files changed
+448 -32

No files matched your search

+8 -1
View File
@@ -524,7 +524,14 @@ impl State {
UseSrtpExtension::parse(extension_data).map_err(InternalError::from)?;
// Store the first profile as our negotiated profile
if !use_srtp.profiles.is_empty() {
client.negotiated_srtp_profile = Some(use_srtp.profiles[0].into());
let profile: SrtpProfile = use_srtp.profiles[0].into();
if !client.engine.config().srtp_profiles().contains(&profile) {
return Err(Error::SecurityError(
crate::SecurityError::ServerSelectedUnofferedSrtpProfile(profile),
)
.into());
}
client.negotiated_srtp_profile = Some(profile);
trace!(
"ServerHello UseSRTP extension processed; selected profile: {:?}",
client.negotiated_srtp_profile