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

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

Issue 1115903002: Refactor the API for CertVerifier::Verify() and the implementation of MultiThreadedCertVerifier::Ver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 5 years, 7 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 // 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_NSS_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_
7 7
8 #include <certt.h> 8 #include <certt.h>
9 #include <keyt.h> 9 #include <keyt.h>
10 #include <nspr.h> 10 #include <nspr.h>
11 #include <nss.h> 11 #include <nss.h>
12 12
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
18 #include "base/threading/platform_thread.h" 18 #include "base/threading/platform_thread.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "net/base/completion_callback.h" 20 #include "net/base/completion_callback.h"
21 #include "net/base/host_port_pair.h" 21 #include "net/base/host_port_pair.h"
22 #include "net/base/net_export.h" 22 #include "net/base/net_export.h"
23 #include "net/base/nss_memio.h" 23 #include "net/base/nss_memio.h"
24 #include "net/cert/cert_verifier.h"
24 #include "net/cert/cert_verify_result.h" 25 #include "net/cert/cert_verify_result.h"
25 #include "net/cert/ct_verify_result.h" 26 #include "net/cert/ct_verify_result.h"
26 #include "net/cert/x509_certificate.h" 27 #include "net/cert/x509_certificate.h"
27 #include "net/log/net_log.h" 28 #include "net/log/net_log.h"
28 #include "net/socket/ssl_client_socket.h" 29 #include "net/socket/ssl_client_socket.h"
29 #include "net/ssl/channel_id_service.h" 30 #include "net/ssl/channel_id_service.h"
30 #include "net/ssl/ssl_config_service.h" 31 #include "net/ssl/ssl_config_service.h"
31 32
32 namespace base { 33 namespace base {
33 class SequencedTaskRunner; 34 class SequencedTaskRunner;
34 } 35 }
35 36
36 namespace net { 37 namespace net {
37 38
38 class BoundNetLog; 39 class BoundNetLog;
39 class CertPolicyEnforcer; 40 class CertPolicyEnforcer;
40 class CertVerifier; 41 class CertVerifier;
41 class ChannelIDService; 42 class ChannelIDService;
42 class CTVerifier; 43 class CTVerifier;
43 class ClientSocketHandle; 44 class ClientSocketHandle;
44 class SingleRequestCertVerifier;
45 class TransportSecurityState; 45 class TransportSecurityState;
46 class X509Certificate; 46 class X509Certificate;
47 47
48 // An SSL client socket implemented with Mozilla NSS. 48 // An SSL client socket implemented with Mozilla NSS.
49 class SSLClientSocketNSS : public SSLClientSocket { 49 class SSLClientSocketNSS : public SSLClientSocket {
50 public: 50 public:
51 // Takes ownership of the |transport_socket|, which must already be connected. 51 // Takes ownership of the |transport_socket|, which must already be connected.
52 // The hostname specified in |host_and_port| will be compared with the name(s) 52 // The hostname specified in |host_and_port| will be compared with the name(s)
53 // in the server's certificate during the SSL handshake. If SSL client 53 // in the server's certificate during the SSL handshake. If SSL client
54 // authentication is requested, the host_and_port field of SSLCertRequestInfo 54 // authentication is requested, the host_and_port field of SSLCertRequestInfo
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 HostPortPair host_and_port_; 160 HostPortPair host_and_port_;
161 SSLConfig ssl_config_; 161 SSLConfig ssl_config_;
162 162
163 scoped_refptr<Core> core_; 163 scoped_refptr<Core> core_;
164 164
165 CompletionCallback user_connect_callback_; 165 CompletionCallback user_connect_callback_;
166 166
167 CertVerifyResult server_cert_verify_result_; 167 CertVerifyResult server_cert_verify_result_;
168 168
169 CertVerifier* const cert_verifier_; 169 CertVerifier* const cert_verifier_;
170 scoped_ptr<SingleRequestCertVerifier> verifier_; 170 scoped_ptr<CertVerifier::Request> cert_verifier_request_;
171 171
172 // Certificate Transparency: Verifier and result holder. 172 // Certificate Transparency: Verifier and result holder.
173 ct::CTVerifyResult ct_verify_result_; 173 ct::CTVerifyResult ct_verify_result_;
174 CTVerifier* cert_transparency_verifier_; 174 CTVerifier* cert_transparency_verifier_;
175 175
176 // The service for retrieving Channel ID keys. May be NULL. 176 // The service for retrieving Channel ID keys. May be NULL.
177 ChannelIDService* channel_id_service_; 177 ChannelIDService* channel_id_service_;
178 178
179 // ssl_session_cache_shard_ is an opaque string that partitions the SSL 179 // ssl_session_cache_shard_ is an opaque string that partitions the SSL
180 // session cache. i.e. sessions created with one value will not attempt to 180 // session cache. i.e. sessions created with one value will not attempt to
(...skipping 28 matching lines...) Expand all
209 // Added the following code Debugging in release mode. 209 // Added the following code Debugging in release mode.
210 mutable base::Lock lock_; 210 mutable base::Lock lock_;
211 // This is mutable so that CalledOnValidThread can set it. 211 // This is mutable so that CalledOnValidThread can set it.
212 // It's guarded by |lock_|. 212 // It's guarded by |lock_|.
213 mutable base::PlatformThreadId valid_thread_id_; 213 mutable base::PlatformThreadId valid_thread_id_;
214 }; 214 };
215 215
216 } // namespace net 216 } // namespace net
217 217
218 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ 218 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698