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

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

Issue 2641633002: Only set certificate on DTLS transport if fingerprint is found in SDP. (Closed)
Patch Set: Fix tests by making FakeTransportController::Connect put fingerprints in transport descriptions. Created 3 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 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 DtlsTransportInternal* dtls_transport, 328 DtlsTransportInternal* dtls_transport,
329 std::string* error_desc) { 329 std::string* error_desc) {
330 dtls_transport->ice_transport()->SetIceParameters( 330 dtls_transport->ice_transport()->SetIceParameters(
331 local_description_->GetIceParameters()); 331 local_description_->GetIceParameters());
332 return true; 332 bool ret = true;
333 if (certificate_) {
334 ret = dtls_transport->SetLocalCertificate(certificate_);
335 RTC_DCHECK(ret);
336 }
337 return ret;
333 } 338 }
334 339
335 bool JsepTransport::ApplyRemoteTransportDescription( 340 bool JsepTransport::ApplyRemoteTransportDescription(
336 DtlsTransportInternal* dtls_transport, 341 DtlsTransportInternal* dtls_transport,
337 std::string* error_desc) { 342 std::string* error_desc) {
338 // Currently, all ICE-related calls still go through this DTLS channel. But 343 // Currently, all ICE-related calls still go through this DTLS channel. But
339 // that will change once we get rid of TransportChannelImpl, and the DTLS 344 // that will change once we get rid of TransportChannelImpl, and the DTLS
340 // channel interface no longer includes ICE-specific methods. Then this class 345 // channel interface no longer includes ICE-specific methods. Then this class
341 // will need to call dtls->ice()->SetIceRole(), for example, assuming the Dtls 346 // will need to call dtls->ice()->SetIceRole(), for example, assuming the Dtls
342 // interface will expose its inner ICE channel. 347 // interface will expose its inner ICE channel.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 } 483 }
479 484
480 // If local is passive, local will act as server. 485 // If local is passive, local will act as server.
481 } 486 }
482 487
483 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER; 488 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER;
484 return true; 489 return true;
485 } 490 }
486 491
487 } // namespace cricket 492 } // 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