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

Side by Side Diff: net/ssl/client_cert_store_nss.h

Issue 1526783002: Build a chain in ClientCertStoreNSS to send intermediates to the server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP test does not work Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SSL_CLIENT_CERT_STORE_NSS_H_ 5 #ifndef NET_SSL_CLIENT_CERT_STORE_NSS_H_
6 #define NET_SSL_CLIENT_CERT_STORE_NSS_H_ 6 #define NET_SSL_CLIENT_CERT_STORE_NSS_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 21 matching lines...) Expand all
32 32
33 // ClientCertStore: 33 // ClientCertStore:
34 void GetClientCerts(const SSLCertRequestInfo& cert_request_info, 34 void GetClientCerts(const SSLCertRequestInfo& cert_request_info,
35 CertificateList* selected_certs, 35 CertificateList* selected_certs,
36 const base::Closure& callback) override; 36 const base::Closure& callback) override;
37 37
38 // Examines the certificates in |certs| to find all certificates that match 38 // Examines the certificates in |certs| to find all certificates that match
39 // the client certificate request in |request|, storing the matching 39 // the client certificate request in |request|, storing the matching
40 // certificates in |filtered_certs|. Any previous content of |filtered_certs| 40 // certificates in |filtered_certs|. Any previous content of |filtered_certs|
41 // will be removed. 41 // will be removed.
42 // If |query_nssdb| is true, NSS will be queried to construct full certificate
43 // chains. If it is false, only the certificate will be considered.
44 // Must be called from a worker thread. 42 // Must be called from a worker thread.
45 static void FilterCertsOnWorkerThread(const CertificateList& certs, 43 static void FilterCertsOnWorkerThread(const CertificateList& certs,
46 const SSLCertRequestInfo& request, 44 const SSLCertRequestInfo& request,
47 bool query_nssdb,
48 CertificateList* filtered_certs); 45 CertificateList* filtered_certs);
49 46
50 // Retrieves all client certificates that are stored by NSS and adds them to 47 // Retrieves all client certificates that are stored by NSS and adds them to
51 // |certs|. |password_delegate| is used to unlock slots if required. 48 // |certs|. |password_delegate| is used to unlock slots if required.
52 // Must be called from a worker thread. 49 // Must be called from a worker thread.
53 static void GetPlatformCertsOnWorkerThread( 50 static void GetPlatformCertsOnWorkerThread(
54 scoped_ptr<crypto::CryptoModuleBlockingPasswordDelegate> 51 scoped_ptr<crypto::CryptoModuleBlockingPasswordDelegate>
55 password_delegate, 52 password_delegate,
56 net::CertificateList* certs); 53 net::CertificateList* certs);
57 54
58 private: 55 private:
59 void GetAndFilterCertsOnWorkerThread( 56 void GetAndFilterCertsOnWorkerThread(
60 scoped_ptr<crypto::CryptoModuleBlockingPasswordDelegate> 57 scoped_ptr<crypto::CryptoModuleBlockingPasswordDelegate>
61 password_delegate, 58 password_delegate,
62 const SSLCertRequestInfo* request, 59 const SSLCertRequestInfo* request,
63 CertificateList* selected_certs); 60 CertificateList* selected_certs);
64 61
65 // The factory for creating the delegate for requesting a password to a 62 // The factory for creating the delegate for requesting a password to a
66 // PKCS#11 token. May be null. 63 // PKCS#11 token. May be null.
67 PasswordDelegateFactory password_delegate_factory_; 64 PasswordDelegateFactory password_delegate_factory_;
68 65
69 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreNSS); 66 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreNSS);
70 }; 67 };
71 68
72 } // namespace net 69 } // namespace net
73 70
74 #endif // NET_SSL_CLIENT_CERT_STORE_NSS_H_ 71 #endif // NET_SSL_CLIENT_CERT_STORE_NSS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698