| Index: talk/app/webrtc/objc/RTCPeerConnectionInterface.mm
|
| diff --git a/talk/app/webrtc/objc/RTCPeerConnectionInterface.mm b/talk/app/webrtc/objc/RTCPeerConnectionInterface.mm
|
| index ff45bd2bacc1668dddc16a6890fae0e5bae9bf00..8cbb5883516dadb664578c27ff4cd30a983c91e0 100644
|
| --- a/talk/app/webrtc/objc/RTCPeerConnectionInterface.mm
|
| +++ b/talk/app/webrtc/objc/RTCPeerConnectionInterface.mm
|
| @@ -29,6 +29,7 @@
|
|
|
| #import "talk/app/webrtc/objc/RTCEnumConverter.h"
|
| #import "talk/app/webrtc/objc/RTCICEServer+Internal.h"
|
| +#import "talk/app/webrtc/objc/public/RTCLogging.h"
|
|
|
| @implementation RTCConfiguration
|
|
|
| @@ -40,6 +41,7 @@
|
| @synthesize audioJitterBufferMaxPackets = _audioJitterBufferMaxPackets;
|
| @synthesize iceConnectionReceivingTimeout = _iceConnectionReceivingTimeout;
|
| @synthesize iceBackupCandidatePairPingInterval = _iceBackupCandidatePairPingInterval;
|
| +@synthesize keyType = _keyType;
|
|
|
| - (instancetype)init {
|
| if (self = [super init]) {
|
| @@ -53,6 +55,7 @@
|
| _audioJitterBufferMaxPackets = config.audio_jitter_buffer_max_packets;
|
| _iceConnectionReceivingTimeout = config.ice_connection_receiving_timeout;
|
| _iceBackupCandidatePairPingInterval = config.ice_backup_candidate_pair_ping_interval;
|
| + _keyType = kRTCEncryptionKeyTypeECDSA;
|
| }
|
| return self;
|
| }
|
| @@ -91,6 +94,16 @@
|
| nativeConfig.audio_jitter_buffer_max_packets = _audioJitterBufferMaxPackets;
|
| nativeConfig.ice_connection_receiving_timeout = _iceConnectionReceivingTimeout;
|
| nativeConfig.ice_backup_candidate_pair_ping_interval = _iceBackupCandidatePairPingInterval;
|
| + if (_keyType == kRTCEncryptionKeyTypeECDSA) {
|
| + rtc::scoped_ptr<rtc::SSLIdentity> identity(
|
| + rtc::SSLIdentity::Generate(webrtc::kIdentityName, rtc::KT_ECDSA));
|
| + if (identity) {
|
| + nativeConfig.certificates.push_back(
|
| + rtc::RTCCertificate::Create(std::move(identity)));
|
| + } else {
|
| + RTCLogWarning(@"Failed to generate ECDSA identity. RSA will be used.");
|
| + }
|
| + }
|
| return nativeConfig;
|
| }
|
|
|
|
|