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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 remote_fingerprint_.reset(new rtc::SSLFingerprint( | 192 remote_fingerprint_.reset(new rtc::SSLFingerprint( |
193 "", NULL, 0)); | 193 "", NULL, 0)); |
194 } | 194 } |
195 | 195 |
196 // Now run the negotiation for the base class. | 196 // Now run the negotiation for the base class. |
197 return Base::NegotiateTransportDescription(local_role, error_desc); | 197 return Base::NegotiateTransportDescription(local_role, error_desc); |
198 } | 198 } |
199 | 199 |
200 DtlsTransportChannelWrapper* CreateTransportChannel(int component) override { | 200 DtlsTransportChannelWrapper* CreateTransportChannel(int component) override { |
201 DtlsTransportChannelWrapper* channel = new DtlsTransportChannelWrapper( | 201 DtlsTransportChannelWrapper* channel = new DtlsTransportChannelWrapper( |
202 Base::CreateTransportChannel(component)); | 202 this, Base::CreateTransportChannel(component)); |
203 channel->SetSslMaxProtocolVersion(ssl_max_version_); | 203 channel->SetSslMaxProtocolVersion(ssl_max_version_); |
204 return channel; | 204 return channel; |
205 } | 205 } |
206 | 206 |
207 void DestroyTransportChannel(TransportChannelImpl* channel) override { | 207 void DestroyTransportChannel(TransportChannelImpl* channel) override { |
208 // Kind of ugly, but this lets us do the exact inverse of the create. | 208 // Kind of ugly, but this lets us do the exact inverse of the create. |
209 DtlsTransportChannelWrapper* dtls_channel = | 209 DtlsTransportChannelWrapper* dtls_channel = |
210 static_cast<DtlsTransportChannelWrapper*>(channel); | 210 static_cast<DtlsTransportChannelWrapper*>(channel); |
211 TransportChannelImpl* base_channel = dtls_channel->channel(); | 211 TransportChannelImpl* base_channel = dtls_channel->channel(); |
212 delete dtls_channel; | 212 delete dtls_channel; |
(...skipping 28 matching lines...) Expand all 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 |