OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2009 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 } | 253 } |
254 return false; | 254 return false; |
255 } | 255 } |
256 | 256 |
257 bool GetSslCipherSuite(int* cipher_suite) override { return false; } | 257 bool GetSslCipherSuite(int* cipher_suite) override { return false; } |
258 | 258 |
259 rtc::scoped_refptr<rtc::RTCCertificate> GetLocalCertificate() const { | 259 rtc::scoped_refptr<rtc::RTCCertificate> GetLocalCertificate() const { |
260 return local_cert_; | 260 return local_cert_; |
261 } | 261 } |
262 | 262 |
263 bool GetRemoteSSLCertificate(rtc::SSLCertificate** cert) const override { | 263 rtc::scoped_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate() |
264 if (!remote_cert_) | 264 const override { |
265 return false; | 265 return remote_cert_ ? rtc::scoped_ptr<rtc::SSLCertificate>( |
266 | 266 remote_cert_->GetReference()) |
267 *cert = remote_cert_->GetReference(); | 267 : nullptr; |
268 return true; | |
269 } | 268 } |
270 | 269 |
271 bool ExportKeyingMaterial(const std::string& label, | 270 bool ExportKeyingMaterial(const std::string& label, |
272 const uint8_t* context, | 271 const uint8_t* context, |
273 size_t context_len, | 272 size_t context_len, |
274 bool use_context, | 273 bool use_context, |
275 uint8_t* result, | 274 uint8_t* result, |
276 size_t result_len) override { | 275 size_t result_len) override { |
277 if (chosen_crypto_suite_ != rtc::SRTP_INVALID_CRYPTO_SUITE) { | 276 if (chosen_crypto_suite_ != rtc::SRTP_INVALID_CRYPTO_SUITE) { |
278 memset(result, 0xff, result_len); | 277 memset(result, 0xff, result_len); |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 } | 560 } |
562 } | 561 } |
563 | 562 |
564 private: | 563 private: |
565 bool fail_create_channel_; | 564 bool fail_create_channel_; |
566 }; | 565 }; |
567 | 566 |
568 } // namespace cricket | 567 } // namespace cricket |
569 | 568 |
570 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ | 569 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ |
OLD | NEW |