mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-15 06:40:43 +01:00

With the expanding use cases for webrtc::CryptoOptions it makes more sense for it to be be available per peer connection instead of only as a factory option. To support backwards compatability for now this code will support the factory method of setting crypto options by default. However it will completely overwrite these settings if an RTCConfiguration.crypto_options is provided. Got LGTM offline from Sami, adding him to TBR if he has any further comments. TBR=sakal@webrtc.org Bug: webrtc:9891 Change-Id: I86914cab69284ad82afd7285fd84ec5f4f2c4986 Reviewed-on: https://webrtc-review.googlesource.com/c/107029 Commit-Queue: Benjamin Wright <benwright@webrtc.org> Reviewed-by: Seth Hampson <shampson@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25375}
33 lines
1.5 KiB
Text
33 lines
1.5 KiB
Text
/*
|
|
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#import "RTCCryptoOptions.h"
|
|
|
|
@implementation RTCCryptoOptions
|
|
|
|
@synthesize srtpEnableGcmCryptoSuites = _srtpEnableGcmCryptoSuites;
|
|
@synthesize srtpEnableAes128Sha1_32CryptoCipher = _srtpEnableAes128Sha1_32CryptoCipher;
|
|
@synthesize srtpEnableEncryptedRtpHeaderExtensions = _srtpEnableEncryptedRtpHeaderExtensions;
|
|
@synthesize sframeRequireFrameEncryption = _sframeRequireFrameEncryption;
|
|
|
|
- (instancetype)initWithSrtpEnableGcmCryptoSuites:(BOOL)srtpEnableGcmCryptoSuites
|
|
srtpEnableAes128Sha1_32CryptoCipher:(BOOL)srtpEnableAes128Sha1_32CryptoCipher
|
|
srtpEnableEncryptedRtpHeaderExtensions:(BOOL)srtpEnableEncryptedRtpHeaderExtensions
|
|
sframeRequireFrameEncryption:(BOOL)sframeRequireFrameEncryption {
|
|
if (self = [super init]) {
|
|
_srtpEnableGcmCryptoSuites = srtpEnableGcmCryptoSuites;
|
|
_srtpEnableAes128Sha1_32CryptoCipher = srtpEnableAes128Sha1_32CryptoCipher;
|
|
_srtpEnableEncryptedRtpHeaderExtensions = srtpEnableEncryptedRtpHeaderExtensions;
|
|
_sframeRequireFrameEncryption = sframeRequireFrameEncryption;
|
|
}
|
|
return self;
|
|
}
|
|
|
|
@end
|