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

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

Issue 173853014: Make OpenSSL UpdateServerCert() OS independent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved FreeX509Stack back inside class using friend to please gcc-4.6 Created 6 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 | « net/socket/ssl_client_socket_nss.cc ('k') | net/socket/ssl_client_socket_openssl.cc » ('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 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; 83 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE;
84 84
85 // Socket implementation. 85 // Socket implementation.
86 virtual int Read(IOBuffer* buf, int buf_len, 86 virtual int Read(IOBuffer* buf, int buf_len,
87 const CompletionCallback& callback) OVERRIDE; 87 const CompletionCallback& callback) OVERRIDE;
88 virtual int Write(IOBuffer* buf, int buf_len, 88 virtual int Write(IOBuffer* buf, int buf_len,
89 const CompletionCallback& callback) OVERRIDE; 89 const CompletionCallback& callback) OVERRIDE;
90 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 90 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
91 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 91 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
92 92
93 protected:
94 // SSLClientSocket implementation.
95 virtual scoped_refptr<X509Certificate> GetUnverifiedServerCertificateChain()
96 const OVERRIDE;
97
93 private: 98 private:
99 class PeerCertificateChain;
94 class SSLContext; 100 class SSLContext;
95 friend class SSLClientSocket; 101 friend class SSLClientSocket;
96 friend class SSLContext; 102 friend class SSLContext;
97 103
98 bool Init(); 104 bool Init();
99 void DoReadCallback(int result); 105 void DoReadCallback(int result);
100 void DoWriteCallback(int result); 106 void DoWriteCallback(int result);
101 107
102 bool DoTransportIO(); 108 bool DoTransportIO();
103 int DoHandshake(); 109 int DoHandshake();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // the result to return on the *next* call to DoPayloadRead(). A value > 0 168 // the result to return on the *next* call to DoPayloadRead(). A value > 0
163 // indicates there is no pending result, otherwise 0 indicates EOF and < 0 169 // indicates there is no pending result, otherwise 0 indicates EOF and < 0
164 // indicates an error. 170 // indicates an error.
165 int pending_read_error_; 171 int pending_read_error_;
166 172
167 // Used by TransportWriteComplete() and TransportReadComplete() to signify an 173 // Used by TransportWriteComplete() and TransportReadComplete() to signify an
168 // error writing to the transport socket. A value of OK indicates no error. 174 // error writing to the transport socket. A value of OK indicates no error.
169 int transport_write_error_; 175 int transport_write_error_;
170 176
171 // Set when handshake finishes. 177 // Set when handshake finishes.
178 scoped_ptr<PeerCertificateChain> server_cert_chain_;
172 scoped_refptr<X509Certificate> server_cert_; 179 scoped_refptr<X509Certificate> server_cert_;
173 CertVerifyResult server_cert_verify_result_; 180 CertVerifyResult server_cert_verify_result_;
174 bool completed_handshake_; 181 bool completed_handshake_;
175 182
176 // Stores client authentication information between ClientAuthHandler and 183 // Stores client authentication information between ClientAuthHandler and
177 // GetSSLCertRequestInfo calls. 184 // GetSSLCertRequestInfo calls.
178 bool client_auth_cert_needed_; 185 bool client_auth_cert_needed_;
179 // List of DER-encoded X.509 DistinguishedName of certificate authorities 186 // List of DER-encoded X.509 DistinguishedName of certificate authorities
180 // allowed by the server. 187 // allowed by the server.
181 std::vector<std::string> cert_authorities_; 188 std::vector<std::string> cert_authorities_;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // True if channel ID extension was negotiated. 226 // True if channel ID extension was negotiated.
220 bool channel_id_xtn_negotiated_; 227 bool channel_id_xtn_negotiated_;
221 // The request handle for |server_bound_cert_service_|. 228 // The request handle for |server_bound_cert_service_|.
222 ServerBoundCertService::RequestHandle channel_id_request_handle_; 229 ServerBoundCertService::RequestHandle channel_id_request_handle_;
223 BoundNetLog net_log_; 230 BoundNetLog net_log_;
224 }; 231 };
225 232
226 } // namespace net 233 } // namespace net
227 234
228 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 235 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/socket/ssl_client_socket_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698