| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 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 17 matching lines...) Expand all Loading... |
| 28 // Everything in this class should be called on the worker thread. | 28 // Everything in this class should be called on the worker thread. |
| 29 template<class Base> | 29 template<class Base> |
| 30 class DtlsTransport : public Base { | 30 class DtlsTransport : public Base { |
| 31 public: | 31 public: |
| 32 DtlsTransport(const std::string& name, | 32 DtlsTransport(const std::string& name, |
| 33 PortAllocator* allocator, | 33 PortAllocator* allocator, |
| 34 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) | 34 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) |
| 35 : Base(name, allocator), | 35 : Base(name, allocator), |
| 36 certificate_(certificate), | 36 certificate_(certificate), |
| 37 secure_role_(rtc::SSL_CLIENT), | 37 secure_role_(rtc::SSL_CLIENT), |
| 38 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) {} | 38 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_12) {} |
| 39 | 39 |
| 40 ~DtlsTransport() { | 40 ~DtlsTransport() { |
| 41 Base::DestroyAllChannels(); | 41 Base::DestroyAllChannels(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void SetLocalCertificate( | 44 void SetLocalCertificate( |
| 45 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override { | 45 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override { |
| 46 certificate_ = certificate; | 46 certificate_ = certificate; |
| 47 } | 47 } |
| 48 bool GetLocalCertificate( | 48 bool GetLocalCertificate( |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; | 242 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; |
| 243 rtc::SSLRole secure_role_; | 243 rtc::SSLRole secure_role_; |
| 244 rtc::SSLProtocolVersion ssl_max_version_; | 244 rtc::SSLProtocolVersion ssl_max_version_; |
| 245 rtc::scoped_ptr<rtc::SSLFingerprint> remote_fingerprint_; | 245 rtc::scoped_ptr<rtc::SSLFingerprint> remote_fingerprint_; |
| 246 }; | 246 }; |
| 247 | 247 |
| 248 } // namespace cricket | 248 } // namespace cricket |
| 249 | 249 |
| 250 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORT_H_ | 250 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORT_H_ |
| OLD | NEW |