Skip to content

Commit 5437ff5

Browse files
committed
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 bd3aaae commit 5437ff5

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
@@ -374,6 +374,8 @@ func (t *DTLSTransport) Start(remoteParameters DTLSParameters) error {
374374
t.srtpProtectionProfile = srtp.ProtectionProfileAeadAes256Gcm
375375
case dtls.SRTP_AES128_CM_HMAC_SHA1_80:
376376
t.srtpProtectionProfile = srtp.ProtectionProfileAes128CmHmacSha1_80
377+
case dtls.SRTP_NULL_HMAC_SHA1_80:
378+
t.srtpProtectionProfile = srtp.ProtectionProfileNullHmacSha1_80
377379
default:
378380
t.onStateChange(DTLSTransportStateFailed)
379381
return ErrNoSRTPProtectionProfile

0 commit comments

Comments
 (0)