Skip to content

Commit

Permalink
android: enable GCM ciphers by default
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed May 16, 2023
1 parent 65905d0 commit d3ce72d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,21 @@ private PeerConnection.RTCConfiguration parseRTCConfiguration(ReadableMap map) {
iceServersArray = map.getArray("iceServers");
}
List<PeerConnection.IceServer> iceServers = createIceServers(iceServersArray);

PeerConnection.RTCConfiguration conf = new PeerConnection.RTCConfiguration(iceServers);
conf.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN;

// Required for perfect negotiation.
conf.enableImplicitRollback = true;

conf.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN;
// Enable GCM ciphers.
CryptoOptions cryptoOptions = CryptoOptions.builder()
.setEnableGcmCryptoSuites(true)
.setEnableAes128Sha1_32CryptoCipher(false)
.setEnableEncryptedRtpHeaderExtensions(false)
.setRequireFrameEncryption(false)
.createCryptoOptions();
conf.cryptoOptions = cryptoOptions;

if (map == null) {
return conf;
Expand Down

0 comments on commit d3ce72d

Please sign in to comment.