Skip to content

Commit 19d0224

Browse files
sirzooroSean-Der
authored andcommitted
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.
1 parent 064006d commit 19d0224

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dtlstransport.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ func (t *DTLSTransport) Start(remoteParameters DTLSParameters) error {
377377
t.srtpProtectionProfile = srtp.ProtectionProfileAeadAes256Gcm
378378
case dtls.SRTP_AES128_CM_HMAC_SHA1_80:
379379
t.srtpProtectionProfile = srtp.ProtectionProfileAes128CmHmacSha1_80
380+
case dtls.SRTP_NULL_HMAC_SHA1_80:
381+
t.srtpProtectionProfile = srtp.ProtectionProfileNullHmacSha1_80
380382
default:
381383
t.onStateChange(DTLSTransportStateFailed)
382384
return ErrNoSRTPProtectionProfile

0 commit comments

Comments
 (0)