Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
add unencrypt cipher
Browse files Browse the repository at this point in the history
  • Loading branch information
cnderrauber committed Aug 20, 2021
1 parent 336b358 commit 29a8d78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dtlstransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func (t *DTLSTransport) Start(remoteParameters DTLSParameters) error {
PrivateKey: cert.privateKey,
},
},
SRTPProtectionProfiles: []dtls.SRTPProtectionProfile{dtls.SRTP_AEAD_AES_128_GCM, dtls.SRTP_AES128_CM_HMAC_SHA1_80},
SRTPProtectionProfiles: []dtls.SRTPProtectionProfile{dtls.SRTP_UNENCRYPTED, dtls.SRTP_AEAD_AES_128_GCM, dtls.SRTP_AES128_CM_HMAC_SHA1_80},
ClientAuth: dtls.RequireAnyClientCert,
LoggerFactory: t.api.settingEngine.LoggerFactory,
InsecureSkipVerify: true,
Expand Down Expand Up @@ -356,6 +356,8 @@ func (t *DTLSTransport) Start(remoteParameters DTLSParameters) error {
t.srtpProtectionProfile = srtp.ProtectionProfileAeadAes128Gcm
case dtls.SRTP_AES128_CM_HMAC_SHA1_80:
t.srtpProtectionProfile = srtp.ProtectionProfileAes128CmHmacSha1_80
case dtls.SRTP_UNENCRYPTED:
t.srtpProtectionProfile = srtp.ProtectionProfileUnencrypted
default:
t.onStateChange(DTLSTransportStateFailed)
return ErrNoSRTPProtectionProfile
Expand Down
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ require (
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20210420210106-798c2154c571
)

replace github.com/pion/srtp/v2 v2.0.2 => github.com/cnderrauber/srtp v2.0.6

replace github.com/pion/dtls/v2 v2.0.9 => github.com/cnderrauber/dtls v2.0.10

0 comments on commit 29a8d78

Please sign in to comment.