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

Side by Side Diff: net/socket/ssl_client_socket_openssl.cc

Issue 948543002: Convert crypto::ScopedOpenSSL to type aliases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « net/cert/x509_util_openssl_unittest.cc ('k') | net/ssl/scoped_openssl_types.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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // OpenSSL binding for SSLClientSocket. The class layout and general principle 5 // OpenSSL binding for SSLClientSocket. The class layout and general principle
6 // of operation is derived from SSLClientSocketNSS. 6 // of operation is derived from SSLClientSocketNSS.
7 7
8 #include "net/socket/ssl_client_socket_openssl.h" 8 #include "net/socket/ssl_client_socket_openssl.h"
9 9
10 #include <errno.h> 10 #include <errno.h>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // the server supports NPN, choosing "http/1.1" is the best answer. 71 // the server supports NPN, choosing "http/1.1" is the best answer.
72 const char kDefaultSupportedNPNProtocol[] = "http/1.1"; 72 const char kDefaultSupportedNPNProtocol[] = "http/1.1";
73 73
74 // Default size of the internal BoringSSL buffers. 74 // Default size of the internal BoringSSL buffers.
75 const int KDefaultOpenSSLBufferSize = 17 * 1024; 75 const int KDefaultOpenSSLBufferSize = 17 * 1024;
76 76
77 void FreeX509Stack(STACK_OF(X509)* ptr) { 77 void FreeX509Stack(STACK_OF(X509)* ptr) {
78 sk_X509_pop_free(ptr, X509_free); 78 sk_X509_pop_free(ptr, X509_free);
79 } 79 }
80 80
81 typedef crypto::ScopedOpenSSL<STACK_OF(X509), FreeX509Stack>::Type 81 using ScopedX509Stack = crypto::ScopedOpenSSL<STACK_OF(X509), FreeX509Stack>;
82 ScopedX509Stack;
83 82
84 #if OPENSSL_VERSION_NUMBER < 0x1000103fL 83 #if OPENSSL_VERSION_NUMBER < 0x1000103fL
85 // This method doesn't seem to have made it into the OpenSSL headers. 84 // This method doesn't seem to have made it into the OpenSSL headers.
86 unsigned long SSL_CIPHER_get_id(const SSL_CIPHER* cipher) { return cipher->id; } 85 unsigned long SSL_CIPHER_get_id(const SSL_CIPHER* cipher) { return cipher->id; }
87 #endif 86 #endif
88 87
89 // Used for encoding the |connection_status| field of an SSLInfo object. 88 // Used for encoding the |connection_status| field of an SSLInfo object.
90 int EncodeSSLConnectionStatus(uint16 cipher_suite, 89 int EncodeSSLConnectionStatus(uint16 cipher_suite,
91 int compression, 90 int compression,
92 int version) { 91 int version) {
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 ct::SCT_STATUS_LOG_UNKNOWN)); 2023 ct::SCT_STATUS_LOG_UNKNOWN));
2025 } 2024 }
2026 } 2025 }
2027 2026
2028 scoped_refptr<X509Certificate> 2027 scoped_refptr<X509Certificate>
2029 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { 2028 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const {
2030 return server_cert_; 2029 return server_cert_;
2031 } 2030 }
2032 2031
2033 } // namespace net 2032 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_util_openssl_unittest.cc ('k') | net/ssl/scoped_openssl_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698