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

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

Issue 2770903003: Accept remote offers with current DTLS role, rather than "actpass". (Closed)
Patch Set: Adding link to spec and section number. Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 } 514 }
515 515
516 bool TransportController::GetSslRole_n(const std::string& transport_name, 516 bool TransportController::GetSslRole_n(const std::string& transport_name,
517 rtc::SSLRole* role) const { 517 rtc::SSLRole* role) const {
518 RTC_DCHECK(network_thread_->IsCurrent()); 518 RTC_DCHECK(network_thread_->IsCurrent());
519 519
520 const JsepTransport* t = GetJsepTransport(transport_name); 520 const JsepTransport* t = GetJsepTransport(transport_name);
521 if (!t) { 521 if (!t) {
522 return false; 522 return false;
523 } 523 }
524 t->GetSslRole(role); 524 rtc::Optional<rtc::SSLRole> current_role = t->GetSslRole();
525 if (!current_role) {
526 return false;
527 }
528 *role = *current_role;
525 return true; 529 return true;
526 } 530 }
527 531
528 bool TransportController::SetLocalCertificate_n( 532 bool TransportController::SetLocalCertificate_n(
529 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) { 533 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) {
530 RTC_DCHECK(network_thread_->IsCurrent()); 534 RTC_DCHECK(network_thread_->IsCurrent());
531 535
532 // Can't change a certificate, or set a null certificate. 536 // Can't change a certificate, or set a null certificate.
533 if (certificate_ || !certificate) { 537 if (certificate_ || !certificate) {
534 return false; 538 return false;
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, 883 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE,
880 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); 884 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state));
881 } 885 }
882 } 886 }
883 887
884 void TransportController::OnDtlsHandshakeError(rtc::SSLHandshakeError error) { 888 void TransportController::OnDtlsHandshakeError(rtc::SSLHandshakeError error) {
885 SignalDtlsHandshakeError(error); 889 SignalDtlsHandshakeError(error);
886 } 890 }
887 891
888 } // namespace cricket 892 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/jseptransport_unittest.cc ('k') | webrtc/p2p/base/transportcontroller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698