| Index: webrtc/p2p/base/transportcontroller.cc
|
| diff --git a/webrtc/p2p/base/transportcontroller.cc b/webrtc/p2p/base/transportcontroller.cc
|
| index 810b96e8d1b4bf31d27218f827d4e4330d51f76d..ab9cb6a648445d3857f776febca3bbf08fd1224f 100644
|
| --- a/webrtc/p2p/base/transportcontroller.cc
|
| +++ b/webrtc/p2p/base/transportcontroller.cc
|
| @@ -262,10 +262,6 @@ TransportChannel* TransportController::CreateTransportChannel_n(
|
| dtls->SetIceRole(ice_role_);
|
| dtls->SetIceTiebreaker(ice_tiebreaker_);
|
| dtls->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
|
| @@ -530,16 +526,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;
|
| }
|
|
|
|
|