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_CRL_SET_H_ | 5 #ifndef NET_CERT_CRL_SET_H_ |
6 #define NET_CERT_CRL_SET_H_ | 6 #define NET_CERT_CRL_SET_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <unordered_map> | |
13 #include <utility> | 12 #include <utility> |
14 #include <vector> | 13 #include <vector> |
15 | 14 |
| 15 #include "base/containers/hash_tables.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/strings/string_piece.h" | 17 #include "base/strings/string_piece.h" |
18 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
19 #include "net/cert/x509_cert_types.h" | 19 #include "net/cert/x509_cert_types.h" |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 | 22 |
23 // A CRLSet is a structure that lists the serial numbers of revoked | 23 // A CRLSet is a structure that lists the serial numbers of revoked |
24 // certificates from a number of issuers where issuers are identified by the | 24 // certificates from a number of issuers where issuers are identified by the |
25 // SHA256 of their SubjectPublicKeyInfo. | 25 // SHA256 of their SubjectPublicKeyInfo. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 uint32_t sequence_; | 88 uint32_t sequence_; |
89 CRLList crls_; | 89 CRLList crls_; |
90 // not_after_ contains the time, in UNIX epoch seconds, after which the | 90 // not_after_ contains the time, in UNIX epoch seconds, after which the |
91 // CRLSet should be considered stale, or 0 if no such time was given. | 91 // CRLSet should be considered stale, or 0 if no such time was given. |
92 uint64_t not_after_; | 92 uint64_t not_after_; |
93 // crls_index_by_issuer_ maps from issuer SPKI hashes to the index in |crls_| | 93 // crls_index_by_issuer_ maps from issuer SPKI hashes to the index in |crls_| |
94 // where the information for that issuer can be found. We have both |crls_| | 94 // where the information for that issuer can be found. We have both |crls_| |
95 // and |crls_index_by_issuer_| because, when applying a delta update, we need | 95 // and |crls_index_by_issuer_| because, when applying a delta update, we need |
96 // to identify a CRL by index. | 96 // to identify a CRL by index. |
97 std::unordered_map<std::string, size_t> crls_index_by_issuer_; | 97 base::hash_map<std::string, size_t> crls_index_by_issuer_; |
98 // blocked_spkis_ contains the SHA256 hashes of SPKIs which are to be blocked | 98 // blocked_spkis_ contains the SHA256 hashes of SPKIs which are to be blocked |
99 // no matter where in a certificate chain they might appear. | 99 // no matter where in a certificate chain they might appear. |
100 std::vector<std::string> blocked_spkis_; | 100 std::vector<std::string> blocked_spkis_; |
101 }; | 101 }; |
102 | 102 |
103 } // namespace net | 103 } // namespace net |
104 | 104 |
105 #endif // NET_CERT_CRL_SET_H_ | 105 #endif // NET_CERT_CRL_SET_H_ |
OLD | NEW |