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

Side by Side Diff: net/base/cert_database.h

Issue 3192021: Add ListCerts method to CertDatabase. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: comment fixes Created 10 years, 3 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
« no previous file with comments | « no previous file | net/base/cert_database_nss.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_BASE_CERT_DATABASE_H_ 5 #ifndef NET_BASE_CERT_DATABASE_H_
6 #define NET_BASE_CERT_DATABASE_H_ 6 #define NET_BASE_CERT_DATABASE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Check whether this is a valid user cert that we have the private key for. 62 // Check whether this is a valid user cert that we have the private key for.
63 // Returns OK or a network error code such as ERR_CERT_CONTAINS_ERRORS. 63 // Returns OK or a network error code such as ERR_CERT_CONTAINS_ERRORS.
64 int CheckUserCert(X509Certificate* cert); 64 int CheckUserCert(X509Certificate* cert);
65 65
66 // Store user (client) certificate. Assumes CheckUserCert has already passed. 66 // Store user (client) certificate. Assumes CheckUserCert has already passed.
67 // Returns OK, or ERR_ADD_USER_CERT_FAILED if there was a problem saving to 67 // Returns OK, or ERR_ADD_USER_CERT_FAILED if there was a problem saving to
68 // the platform cert database, or possibly other network error codes. 68 // the platform cert database, or possibly other network error codes.
69 int AddUserCert(X509Certificate* cert); 69 int AddUserCert(X509Certificate* cert);
70 70
71 #if defined(USE_NSS) 71 #if defined(USE_NSS)
72 // Get a list of unique certificates in the certificate database. (One
73 // instance of all certificates.)
74 void ListCerts(CertificateList* certs);
75
72 // Import certificates and private keys from PKCS #12 blob. 76 // Import certificates and private keys from PKCS #12 blob.
73 // Returns OK or a network error code such as ERR_PKCS12_IMPORT_BAD_PASSWORD 77 // Returns OK or a network error code such as ERR_PKCS12_IMPORT_BAD_PASSWORD
74 // or ERR_PKCS12_IMPORT_ERROR. 78 // or ERR_PKCS12_IMPORT_ERROR.
75 int ImportFromPKCS12(const std::string& data, const string16& password); 79 int ImportFromPKCS12(const std::string& data, const string16& password);
76 80
77 // Export the given certificates and private keys into a PKCS #12 blob, 81 // Export the given certificates and private keys into a PKCS #12 blob,
78 // storing into |output|. 82 // storing into |output|.
79 // Returns the number of certificates successfully exported. 83 // Returns the number of certificates successfully exported.
80 int ExportToPKCS12(const CertificateList& certs, const string16& password, 84 int ExportToPKCS12(const CertificateList& certs, const string16& password,
81 std::string* output); 85 std::string* output);
(...skipping 26 matching lines...) Expand all
108 bool DeleteCertAndKey(const X509Certificate* cert); 112 bool DeleteCertAndKey(const X509Certificate* cert);
109 #endif 113 #endif
110 114
111 private: 115 private:
112 DISALLOW_COPY_AND_ASSIGN(CertDatabase); 116 DISALLOW_COPY_AND_ASSIGN(CertDatabase);
113 }; 117 };
114 118
115 } // namespace net 119 } // namespace net
116 120
117 #endif // NET_BASE_CERT_DATABASE_H_ 121 #endif // NET_BASE_CERT_DATABASE_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/cert_database_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698