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

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

Issue 3565006: Decouples certificates viewers from NSS to prepare support for OpenSSL. (Closed)
Patch Set: Comments / ProcessIDN Created 10 years, 2 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 | « chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp ('k') | net/base/cert_type.h » ('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>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "base/ref_counted.h" 14 #include "base/ref_counted.h"
15 #include "net/base/cert_type.h"
15 16
16 namespace net { 17 namespace net {
17 18
18 class X509Certificate; 19 class X509Certificate;
19 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; 20 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList;
20 21
21 // Constants to classify the type of a certificate.
22 // This is only used in the context of CertDatabase, but is defined outside to
23 // avoid an awkwardly long type name.
24 // The type is a combination of intrinsic properties, such as the presense of an
25 // email address or Certificate Authority Basic Constraint, and assigned trust
26 // values. For example, a cert with no email address, basic constraints, or
27 // trust, would be classified as UNKNOWN_CERT. If that cert is then trusted
28 // with SetCertTrust(cert, SERVER_CERT, TRUSTED_SSL), it would become a
29 // SERVER_CERT.
30 enum CertType {
31 UNKNOWN_CERT,
32 CA_CERT,
33 USER_CERT,
34 EMAIL_CERT,
35 SERVER_CERT,
36 NUM_CERT_TYPES
37 };
38 22
39 // This class provides functions to manipulate the local 23 // This class provides functions to manipulate the local
40 // certificate store. 24 // certificate store.
41 25
42 // TODO(gauravsh): This class could be augmented with methods 26 // TODO(gauravsh): This class could be augmented with methods
43 // for all operations that manipulate the underlying system 27 // for all operations that manipulate the underlying system
44 // certificate store. 28 // certificate store.
45 29
46 class CertDatabase { 30 class CertDatabase {
47 public: 31 public:
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 bool DeleteCertAndKey(const X509Certificate* cert); 115 bool DeleteCertAndKey(const X509Certificate* cert);
132 #endif 116 #endif
133 117
134 private: 118 private:
135 DISALLOW_COPY_AND_ASSIGN(CertDatabase); 119 DISALLOW_COPY_AND_ASSIGN(CertDatabase);
136 }; 120 };
137 121
138 } // namespace net 122 } // namespace net
139 123
140 #endif // NET_BASE_CERT_DATABASE_H_ 124 #endif // NET_BASE_CERT_DATABASE_H_
OLDNEW
« no previous file with comments | « chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp ('k') | net/base/cert_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698