OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_NET_CLIENT_CERT_STORE_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_NET_CLIENT_CERT_STORE_CHROMEOS_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "crypto/scoped_nss_types.h" |
| 12 #include "net/cert/nss_profile_filter_chromeos.h" |
| 13 #include "net/cert/x509_certificate.h" |
| 14 #include "net/ssl/client_cert_store.h" |
| 15 #include "net/ssl/client_cert_store_impl.h" |
| 16 |
| 17 namespace chromeos { |
| 18 |
| 19 class ClientCertStoreChromeOS : public net::ClientCertStore { |
| 20 public: |
| 21 // Caller must ensure |context| is still alive at the point GetClientCerts is |
| 22 // called. |
| 23 explicit ClientCertStoreChromeOS(content::ResourceContext* context); |
| 24 virtual ~ClientCertStoreChromeOS(); |
| 25 |
| 26 // net::ClientCertStore: |
| 27 virtual void GetClientCerts(const net::SSLCertRequestInfo& cert_request_info, |
| 28 net::CertificateList* selected_certs, |
| 29 const base::Closure& callback) OVERRIDE; |
| 30 |
| 31 private: |
| 32 void DidGetSlots(crypto::ScopedPK11Slot public_slot, |
| 33 crypto::ScopedPK11Slot private_slot); |
| 34 void GotClientCerts(); |
| 35 |
| 36 content::ResourceContext* context_; |
| 37 |
| 38 const net::SSLCertRequestInfo* cert_request_info_; |
| 39 |
| 40 net::CertificateList* selected_certs_; |
| 41 |
| 42 net::ClientCertStoreImpl net_client_cert_store_impl_; |
| 43 |
| 44 net::NSSProfileFilterChromeOS profile_filter_; |
| 45 |
| 46 base::Closure callback_; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreChromeOS); |
| 49 }; |
| 50 |
| 51 } // namespace chromeos |
| 52 |
| 53 #endif // CHROME_BROWSER_CHROMEOS_NET_CLIENT_CERT_STORE_CHROMEOS_H_ |
OLD | NEW |