From 19d022423d7975b7dafce874c0e2c7bc957ee066 Mon Sep 17 00:00:00 2001 From: sirzooro Date: Sat, 20 Jul 2024 23:33:03 +0200 Subject: [PATCH] Added support for SRTP_NULL_HMAC_SHA1_80 cipher Added support for SRTP_NULL_HMAC_SHA1_80 protection profile (cipher). It is disabled by default. You need to use SettingEngine and set list of allowed SRTP protection profiles using its SetSRTPProtectionProfiles function called with dtls.SRTP_NULL_HMAC_SHA1_80 as a parameter. You need to do this for both pion peers. For non-pion ones you may need to enable it somewhere too, as NULL cipher is usually disabled for security reasons. --- dtlstransport.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dtlstransport.go b/dtlstransport.go index 410d1645831..ec08a0846d3 100644 --- a/dtlstransport.go +++ b/dtlstransport.go @@ -377,6 +377,8 @@ func (t *DTLSTransport) Start(remoteParameters DTLSParameters) error { t.srtpProtectionProfile = srtp.ProtectionProfileAeadAes256Gcm case dtls.SRTP_AES128_CM_HMAC_SHA1_80: t.srtpProtectionProfile = srtp.ProtectionProfileAes128CmHmacSha1_80 + case dtls.SRTP_NULL_HMAC_SHA1_80: + t.srtpProtectionProfile = srtp.ProtectionProfileNullHmacSha1_80 default: t.onStateChange(DTLSTransportStateFailed) return ErrNoSRTPProtectionProfile