Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Unified Diff: talk/app/webrtc/objc/RTCPeerConnectionInterface.mm

Issue 1649533002: Make ECDSA default for RTCPeerConnection (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix builds Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« no previous file with comments | « no previous file | talk/app/webrtc/objc/public/RTCPeerConnectionInterface.h » ('j') | webrtc/api/objc/RTCConfiguration.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698