From 5437ff5ac92272a4acb15374fb057aa865095f7d 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 0267ca591dc..b3a35bb12b6 100644 --- a/dtlstransport.go +++ b/dtlstransport.go @@ -374,6 +374,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