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

Unified Diff: webrtc/p2p/base/transportcontroller.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/jseptransport.cc ('k') | webrtc/p2p/base/transportdescriptionfactory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/transportcontroller.cc
diff --git a/webrtc/p2p/base/transportcontroller.cc b/webrtc/p2p/base/transportcontroller.cc
index 820645b42b7dc7589cb35423a1d0d363d0fbe10d..1dc21180ad93ad888201c7e942fbafb8fa9c4ec4 100644
--- a/webrtc/p2p/base/transportcontroller.cc
+++ b/webrtc/p2p/base/transportcontroller.cc
@@ -262,10 +262,6 @@ DtlsTransportInternal* TransportController::CreateDtlsTransport_n(
dtls->ice_transport()->SetIceRole(ice_role_);
dtls->ice_transport()->SetIceTiebreaker(ice_tiebreaker_);
dtls->ice_transport()->SetIceConfig(ice_config_);
- if (certificate_) {
- bool set_cert_success = dtls->SetLocalCertificate(certificate_);
- RTC_DCHECK(set_cert_success);
- }
// Connect to signals offered by the channels. Currently, the DTLS channel
// forwards signals from the ICE channel, so we only need to connect to the
@@ -539,16 +535,13 @@ bool TransportController::SetLocalCertificate_n(
}
certificate_ = certificate;
- // Set certificate both for Transport, which verifies it matches the
- // fingerprint in SDP...
+ // Set certificate for JsepTransport, which verifies it matches the
+ // fingerprint in SDP, and only applies it to the DTLS transport if a
+ // fingerprint attribute is present in SDP. This is used for fallback from
+ // DTLS to SDES.
for (auto& kv : transports_) {
kv.second->SetLocalCertificate(certificate_);
}
- // ... and for the DTLS channel, which needs it for the DTLS handshake.
- for (auto& channel : channels_) {
- bool set_cert_success = channel->dtls()->SetLocalCertificate(certificate);
- RTC_DCHECK(set_cert_success);
- }
return true;
}
« no previous file with comments | « webrtc/p2p/base/jseptransport.cc ('k') | webrtc/p2p/base/transportdescriptionfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698