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

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

Issue 8342054: net: enable CRL sets behind a command line flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_win.cc ('k') | net/socket/ssl_host_info.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_HOST_INFO_H_ 5 #ifndef NET_SOCKET_SSL_HOST_INFO_H_
6 #define NET_SOCKET_SSL_HOST_INFO_H_ 6 #define NET_SOCKET_SSL_HOST_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "net/base/cert_verifier.h" 15 #include "net/base/cert_verifier.h"
16 #include "net/base/cert_verify_result.h" 16 #include "net/base/cert_verify_result.h"
17 #include "net/base/completion_callback.h" 17 #include "net/base/completion_callback.h"
18 #include "net/base/dnsrr_resolver.h" 18 #include "net/base/dnsrr_resolver.h"
19 #include "net/base/net_export.h" 19 #include "net/base/net_export.h"
20 #include "net/socket/ssl_client_socket.h" 20 #include "net/socket/ssl_client_socket.h"
21 21
22 namespace net { 22 namespace net {
23 23
24 class CRLSet;
24 class X509Certificate; 25 class X509Certificate;
25 struct SSLConfig; 26 struct SSLConfig;
26 27
27 // SSLHostInfo is an interface for fetching information about an SSL server. 28 // SSLHostInfo is an interface for fetching information about an SSL server.
28 // This information may be stored on disk so does not include keys or session 29 // This information may be stored on disk so does not include keys or session
29 // information etc. Primarily it's intended for caching the server's 30 // information etc. Primarily it's intended for caching the server's
30 // certificates. 31 // certificates.
31 class NET_EXPORT_PRIVATE SSLHostInfo { 32 class NET_EXPORT_PRIVATE SSLHostInfo {
32 public: 33 public:
33 SSLHostInfo(const std::string& hostname, 34 SSLHostInfo(const std::string& hostname,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // This is the callback function which the CertVerifier calls via |callback_|. 115 // This is the callback function which the CertVerifier calls via |callback_|.
115 void VerifyCallback(int rv); 116 void VerifyCallback(int rv);
116 117
117 // ParseInner is a helper function for Parse. 118 // ParseInner is a helper function for Parse.
118 bool ParseInner(const std::string& data); 119 bool ParseInner(const std::string& data);
119 120
120 // This is the hostname that we'll validate the certificates against. 121 // This is the hostname that we'll validate the certificates against.
121 const std::string hostname_; 122 const std::string hostname_;
122 bool cert_parsing_failed_; 123 bool cert_parsing_failed_;
123 OldCompletionCallback* cert_verification_callback_; 124 OldCompletionCallback* cert_verification_callback_;
124 // These two members are taken from the SSLConfig. 125 // These three members are taken from the SSLConfig.
125 bool rev_checking_enabled_; 126 bool rev_checking_enabled_;
126 bool verify_ev_cert_; 127 bool verify_ev_cert_;
128 scoped_refptr<CRLSet> crl_set_;
127 base::TimeTicks verification_start_time_; 129 base::TimeTicks verification_start_time_;
128 base::TimeTicks verification_end_time_; 130 base::TimeTicks verification_end_time_;
129 CertVerifyResult cert_verify_result_; 131 CertVerifyResult cert_verify_result_;
130 SingleRequestCertVerifier verifier_; 132 SingleRequestCertVerifier verifier_;
131 scoped_refptr<X509Certificate> cert_; 133 scoped_refptr<X509Certificate> cert_;
132 base::WeakPtrFactory<SSLHostInfo> weak_factory_; 134 base::WeakPtrFactory<SSLHostInfo> weak_factory_;
133 135
134 DnsRRResolver* dnsrr_resolver_; 136 DnsRRResolver* dnsrr_resolver_;
135 OldCompletionCallback* dns_callback_; 137 OldCompletionCallback* dns_callback_;
136 DnsRRResolver::Handle dns_handle_; 138 DnsRRResolver::Handle dns_handle_;
137 RRResponse dns_response_; 139 RRResponse dns_response_;
138 base::TimeTicks dns_lookup_start_time_; 140 base::TimeTicks dns_lookup_start_time_;
139 base::TimeTicks cert_verification_finished_time_; 141 base::TimeTicks cert_verification_finished_time_;
140 }; 142 };
141 143
142 class SSLHostInfoFactory { 144 class SSLHostInfoFactory {
143 public: 145 public:
144 virtual ~SSLHostInfoFactory(); 146 virtual ~SSLHostInfoFactory();
145 147
146 // GetForHost returns a fresh, allocated SSLHostInfo for the given hostname 148 // GetForHost returns a fresh, allocated SSLHostInfo for the given hostname
147 // or NULL on failure. 149 // or NULL on failure.
148 virtual SSLHostInfo* GetForHost(const std::string& hostname, 150 virtual SSLHostInfo* GetForHost(const std::string& hostname,
149 const SSLConfig& ssl_config) = 0; 151 const SSLConfig& ssl_config) = 0;
150 }; 152 };
151 153
152 } // namespace net 154 } // namespace net
153 155
154 #endif // NET_SOCKET_SSL_HOST_INFO_H_ 156 #endif // NET_SOCKET_SSL_HOST_INFO_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_win.cc ('k') | net/socket/ssl_host_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698