OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |