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

Side by Side Diff: webrtc/p2p/base/jseptransport.cc

Issue 2681403002: Merge to M57: Only set certificate on DTLS transport if fingerprint is found in SDP. (Closed)
Patch Set: Changing upstream branch to m57 Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/faketransportcontroller.h ('k') | webrtc/p2p/base/transportcontroller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 desc << "Local fingerprint does not match identity. Expected: "; 321 desc << "Local fingerprint does not match identity. Expected: ";
322 desc << fp_tmp->ToString(); 322 desc << fp_tmp->ToString();
323 desc << " Got: " << fingerprint->ToString(); 323 desc << " Got: " << fingerprint->ToString();
324 return BadTransportDescription(desc.str(), error_desc); 324 return BadTransportDescription(desc.str(), error_desc);
325 } 325 }
326 326
327 bool JsepTransport::ApplyLocalTransportDescription( 327 bool JsepTransport::ApplyLocalTransportDescription(
328 TransportChannelImpl* channel, 328 TransportChannelImpl* channel,
329 std::string* error_desc) { 329 std::string* error_desc) {
330 channel->SetIceParameters(local_description_->GetIceParameters()); 330 channel->SetIceParameters(local_description_->GetIceParameters());
331 return true; 331 bool ret = true;
332 if (certificate_) {
333 ret = channel->SetLocalCertificate(certificate_);
334 RTC_DCHECK(ret);
335 }
336 return ret;
332 } 337 }
333 338
334 bool JsepTransport::ApplyRemoteTransportDescription( 339 bool JsepTransport::ApplyRemoteTransportDescription(
335 TransportChannelImpl* channel, 340 TransportChannelImpl* channel,
336 std::string* error_desc) { 341 std::string* error_desc) {
337 // Currently, all ICE-related calls still go through this DTLS channel. But 342 // Currently, all ICE-related calls still go through this DTLS channel. But
338 // that will change once we get rid of TransportChannelImpl, and the DTLS 343 // that will change once we get rid of TransportChannelImpl, and the DTLS
339 // channel interface no longer includes ICE-specific methods. Then this class 344 // channel interface no longer includes ICE-specific methods. Then this class
340 // will need to call dtls->ice()->SetIceRole(), for example, assuming the Dtls 345 // will need to call dtls->ice()->SetIceRole(), for example, assuming the Dtls
341 // interface will expose its inner ICE channel. 346 // interface will expose its inner ICE channel.
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 480 }
476 481
477 // If local is passive, local will act as server. 482 // If local is passive, local will act as server.
478 } 483 }
479 484
480 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER; 485 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER;
481 return true; 486 return true;
482 } 487 }
483 488
484 } // namespace cricket 489 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/faketransportcontroller.h ('k') | webrtc/p2p/base/transportcontroller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698