| OLD | NEW |
| 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_CERT_NSS_CERT_DATABASE_H_ | 5 #ifndef NET_CERT_NSS_CERT_DATABASE_H_ |
| 6 #define NET_CERT_NSS_CERT_DATABASE_H_ | 6 #define NET_CERT_NSS_CERT_DATABASE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // If |need_rw| is true, only writable modules will be returned. | 161 // If |need_rw| is true, only writable modules will be returned. |
| 162 // TODO(mattm): come up with better alternative to CryptoModuleList. | 162 // TODO(mattm): come up with better alternative to CryptoModuleList. |
| 163 virtual void ListModules(CryptoModuleList* modules, bool need_rw) const; | 163 virtual void ListModules(CryptoModuleList* modules, bool need_rw) const; |
| 164 | 164 |
| 165 // Import certificates and private keys from PKCS #12 blob into the module. | 165 // Import certificates and private keys from PKCS #12 blob into the module. |
| 166 // If |is_extractable| is false, mark the private key as being unextractable | 166 // If |is_extractable| is false, mark the private key as being unextractable |
| 167 // from the module. | 167 // from the module. |
| 168 // Returns OK or a network error code such as ERR_PKCS12_IMPORT_BAD_PASSWORD | 168 // Returns OK or a network error code such as ERR_PKCS12_IMPORT_BAD_PASSWORD |
| 169 // or ERR_PKCS12_IMPORT_ERROR. |imported_certs|, if non-NULL, returns a list | 169 // or ERR_PKCS12_IMPORT_ERROR. |imported_certs|, if non-NULL, returns a list |
| 170 // of certs that were imported. | 170 // of certs that were imported. |
| 171 int ImportFromPKCS12(CryptoModule* module, | 171 int ImportFromPKCS12(PK11SlotInfo* slot_info, |
| 172 const std::string& data, | 172 const std::string& data, |
| 173 const base::string16& password, | 173 const base::string16& password, |
| 174 bool is_extractable, | 174 bool is_extractable, |
| 175 CertificateList* imported_certs); | 175 CertificateList* imported_certs); |
| 176 | 176 |
| 177 // Export the given certificates and private keys into a PKCS #12 blob, | 177 // Export the given certificates and private keys into a PKCS #12 blob, |
| 178 // storing into |output|. | 178 // storing into |output|. |
| 179 // Returns the number of certificates successfully exported. | 179 // Returns the number of certificates successfully exported. |
| 180 int ExportToPKCS12(const CertificateList& certs, | 180 int ExportToPKCS12(const CertificateList& certs, |
| 181 const base::string16& password, | 181 const base::string16& password, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 const scoped_refptr<base::ObserverListThreadSafe<Observer>> observer_list_; | 305 const scoped_refptr<base::ObserverListThreadSafe<Observer>> observer_list_; |
| 306 | 306 |
| 307 base::WeakPtrFactory<NSSCertDatabase> weak_factory_; | 307 base::WeakPtrFactory<NSSCertDatabase> weak_factory_; |
| 308 | 308 |
| 309 DISALLOW_COPY_AND_ASSIGN(NSSCertDatabase); | 309 DISALLOW_COPY_AND_ASSIGN(NSSCertDatabase); |
| 310 }; | 310 }; |
| 311 | 311 |
| 312 } // namespace net | 312 } // namespace net |
| 313 | 313 |
| 314 #endif // NET_CERT_NSS_CERT_DATABASE_H_ | 314 #endif // NET_CERT_NSS_CERT_DATABASE_H_ |
| OLD | NEW |