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

Side by Side Diff: webrtc/base/opensslidentity.cc

Issue 1799233002: SSLCertificate::GetChain: Return scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: No auto Created 4 years, 9 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
« no previous file with comments | « webrtc/base/opensslidentity.h ('k') | webrtc/base/sslidentity.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 default: 273 default:
274 // Unknown algorithm. There are several unhandled options that are less 274 // Unknown algorithm. There are several unhandled options that are less
275 // common and more complex. 275 // common and more complex.
276 LOG(LS_ERROR) << "Unknown signature algorithm NID: " << nid; 276 LOG(LS_ERROR) << "Unknown signature algorithm NID: " << nid;
277 algorithm->clear(); 277 algorithm->clear();
278 return false; 278 return false;
279 } 279 }
280 return true; 280 return true;
281 } 281 }
282 282
283 bool OpenSSLCertificate::GetChain(SSLCertChain** chain) const { 283 rtc::scoped_ptr<SSLCertChain> OpenSSLCertificate::GetChain() const {
284 // Chains are not yet supported when using OpenSSL. 284 // Chains are not yet supported when using OpenSSL.
285 // OpenSSLStreamAdapter::SSLVerifyCallback currently requires the remote 285 // OpenSSLStreamAdapter::SSLVerifyCallback currently requires the remote
286 // certificate to be self-signed. 286 // certificate to be self-signed.
287 return false; 287 return nullptr;
288 } 288 }
289 289
290 bool OpenSSLCertificate::ComputeDigest(const std::string& algorithm, 290 bool OpenSSLCertificate::ComputeDigest(const std::string& algorithm,
291 unsigned char* digest, 291 unsigned char* digest,
292 size_t size, 292 size_t size,
293 size_t* length) const { 293 size_t* length) const {
294 return ComputeDigest(x509_, algorithm, digest, size, length); 294 return ComputeDigest(x509_, algorithm, digest, size, length);
295 } 295 }
296 296
297 bool OpenSSLCertificate::ComputeDigest(const X509* x509, 297 bool OpenSSLCertificate::ComputeDigest(const X509* x509,
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 SSL_CTX_use_PrivateKey(ctx, key_pair_->pkey()) != 1) { 469 SSL_CTX_use_PrivateKey(ctx, key_pair_->pkey()) != 1) {
470 LogSSLErrors("Configuring key and certificate"); 470 LogSSLErrors("Configuring key and certificate");
471 return false; 471 return false;
472 } 472 }
473 return true; 473 return true;
474 } 474 }
475 475
476 } // namespace rtc 476 } // namespace rtc
477 477
478 #endif // HAVE_OPENSSL_SSL_H 478 #endif // HAVE_OPENSSL_SSL_H
OLDNEW
« no previous file with comments | « webrtc/base/opensslidentity.h ('k') | webrtc/base/sslidentity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698