| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 return false; | 243 return false; |
| 244 } | 244 } |
| 245 | 245 |
| 246 if (reconnect) { | 246 if (reconnect) { |
| 247 Reconnect(); | 247 Reconnect(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 return true; | 250 return true; |
| 251 } | 251 } |
| 252 | 252 |
| 253 bool DtlsTransportChannelWrapper::GetRemoteSSLCertificate( | 253 rtc::scoped_ptr<rtc::SSLCertificate> |
| 254 rtc::SSLCertificate** cert) const { | 254 DtlsTransportChannelWrapper::GetRemoteSSLCertificate() const { |
| 255 if (!dtls_) { | 255 if (!dtls_) { |
| 256 return false; | 256 return nullptr; |
| 257 } | 257 } |
| 258 | 258 |
| 259 return dtls_->GetPeerCertificate(cert); | 259 return dtls_->GetPeerCertificate(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 bool DtlsTransportChannelWrapper::SetupDtls() { | 262 bool DtlsTransportChannelWrapper::SetupDtls() { |
| 263 StreamInterfaceChannel* downward = new StreamInterfaceChannel(channel_); | 263 StreamInterfaceChannel* downward = new StreamInterfaceChannel(channel_); |
| 264 | 264 |
| 265 dtls_.reset(rtc::SSLStreamAdapter::Create(downward)); | 265 dtls_.reset(rtc::SSLStreamAdapter::Create(downward)); |
| 266 if (!dtls_) { | 266 if (!dtls_) { |
| 267 LOG_J(LS_ERROR, this) << "Failed to create DTLS adapter."; | 267 LOG_J(LS_ERROR, this) << "Failed to create DTLS adapter."; |
| 268 delete downward; | 268 delete downward; |
| 269 return false; | 269 return false; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 | 653 |
| 654 void DtlsTransportChannelWrapper::Reconnect() { | 654 void DtlsTransportChannelWrapper::Reconnect() { |
| 655 set_dtls_state(DTLS_TRANSPORT_NEW); | 655 set_dtls_state(DTLS_TRANSPORT_NEW); |
| 656 set_writable(false); | 656 set_writable(false); |
| 657 if (channel_->writable()) { | 657 if (channel_->writable()) { |
| 658 OnWritableState(channel_); | 658 OnWritableState(channel_); |
| 659 } | 659 } |
| 660 } | 660 } |
| 661 | 661 |
| 662 } // namespace cricket | 662 } // namespace cricket |
| OLD | NEW |