Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: webrtc/p2p/base/dtlstransportchannel.cc

Issue 1802013002: A bunch of interfaces: Return scoped_ptr<SSLCertificate> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 return false; 241 return false;
242 } 242 }
243 243
244 if (reconnect) { 244 if (reconnect) {
245 Reconnect(); 245 Reconnect();
246 } 246 }
247 247
248 return true; 248 return true;
249 } 249 }
250 250
251 bool DtlsTransportChannelWrapper::GetRemoteSSLCertificate( 251 rtc::scoped_ptr<rtc::SSLCertificate>
252 rtc::SSLCertificate** cert) const { 252 DtlsTransportChannelWrapper::GetRemoteSSLCertificate() const {
253 if (!dtls_) { 253 if (!dtls_) {
254 return false; 254 return nullptr;
255 } 255 }
256 256
257 return dtls_->GetPeerCertificate(cert); 257 return dtls_->GetPeerCertificate();
258 } 258 }
259 259
260 bool DtlsTransportChannelWrapper::SetupDtls() { 260 bool DtlsTransportChannelWrapper::SetupDtls() {
261 StreamInterfaceChannel* downward = new StreamInterfaceChannel(channel_); 261 StreamInterfaceChannel* downward = new StreamInterfaceChannel(channel_);
262 262
263 dtls_.reset(rtc::SSLStreamAdapter::Create(downward)); 263 dtls_.reset(rtc::SSLStreamAdapter::Create(downward));
264 if (!dtls_) { 264 if (!dtls_) {
265 LOG_J(LS_ERROR, this) << "Failed to create DTLS adapter."; 265 LOG_J(LS_ERROR, this) << "Failed to create DTLS adapter.";
266 delete downward; 266 delete downward;
267 return false; 267 return false;
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 642
643 void DtlsTransportChannelWrapper::Reconnect() { 643 void DtlsTransportChannelWrapper::Reconnect() {
644 set_dtls_state(DTLS_TRANSPORT_NEW); 644 set_dtls_state(DTLS_TRANSPORT_NEW);
645 set_writable(false); 645 set_writable(false);
646 if (channel_->writable()) { 646 if (channel_->writable()) {
647 OnWritableState(channel_); 647 OnWritableState(channel_);
648 } 648 }
649 } 649 }
650 650
651 } // namespace cricket 651 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698