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

Side by Side Diff: net/cert/crl_set.h

Issue 1158923005: Use the exact-width integer types defined in <stdint.h> rather than (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comments. Exclude mime_sniffer*. Rebase. Created 5 years, 6 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
OLDNEW
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 <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const base::StringPiece& serial_number, 42 const base::StringPiece& serial_number,
43 const base::StringPiece& issuer_spki_hash) const; 43 const base::StringPiece& issuer_spki_hash) const;
44 44
45 // IsExpired returns true iff the current time is past the NotAfter time 45 // IsExpired returns true iff the current time is past the NotAfter time
46 // specified in the CRLSet. 46 // specified in the CRLSet.
47 bool IsExpired() const; 47 bool IsExpired() const;
48 48
49 // sequence returns the sequence number of this CRL set. CRL sets generated 49 // sequence returns the sequence number of this CRL set. CRL sets generated
50 // by the same source are given strictly monotonically increasing sequence 50 // by the same source are given strictly monotonically increasing sequence
51 // numbers. 51 // numbers.
52 uint32 sequence() const; 52 uint32_t sequence() const;
53 53
54 // CRLList contains a list of (issuer SPKI hash, revoked serial numbers) 54 // CRLList contains a list of (issuer SPKI hash, revoked serial numbers)
55 // pairs. 55 // pairs.
56 typedef std::vector< std::pair<std::string, std::vector<std::string> > > 56 typedef std::vector< std::pair<std::string, std::vector<std::string> > >
57 CRLList; 57 CRLList;
58 58
59 // crls returns the internal state of this CRLSet. It should only be used in 59 // crls returns the internal state of this CRLSet. It should only be used in
60 // testing. 60 // testing.
61 const CRLList& crls() const; 61 const CRLList& crls() const;
62 62
(...skipping 12 matching lines...) Expand all
75 const SHA256HashValue* issuer_spki, 75 const SHA256HashValue* issuer_spki,
76 const std::string& serial_number); 76 const std::string& serial_number);
77 77
78 private: 78 private:
79 CRLSet(); 79 CRLSet();
80 ~CRLSet(); 80 ~CRLSet();
81 81
82 friend class base::RefCountedThreadSafe<CRLSet>; 82 friend class base::RefCountedThreadSafe<CRLSet>;
83 friend class CRLSetStorage; 83 friend class CRLSetStorage;
84 84
85 uint32 sequence_; 85 uint32_t sequence_;
86 CRLList crls_; 86 CRLList crls_;
87 // not_after_ contains the time, in UNIX epoch seconds, after which the 87 // not_after_ contains the time, in UNIX epoch seconds, after which the
88 // CRLSet should be considered stale, or 0 if no such time was given. 88 // CRLSet should be considered stale, or 0 if no such time was given.
89 uint64 not_after_; 89 uint64_t not_after_;
90 // crls_index_by_issuer_ maps from issuer SPKI hashes to the index in |crls_| 90 // crls_index_by_issuer_ maps from issuer SPKI hashes to the index in |crls_|
91 // where the information for that issuer can be found. We have both |crls_| 91 // where the information for that issuer can be found. We have both |crls_|
92 // and |crls_index_by_issuer_| because, when applying a delta update, we need 92 // and |crls_index_by_issuer_| because, when applying a delta update, we need
93 // to identify a CRL by index. 93 // to identify a CRL by index.
94 base::hash_map<std::string, size_t> crls_index_by_issuer_; 94 base::hash_map<std::string, size_t> crls_index_by_issuer_;
95 // blocked_spkis_ contains the SHA256 hashes of SPKIs which are to be blocked 95 // blocked_spkis_ contains the SHA256 hashes of SPKIs which are to be blocked
96 // no matter where in a certificate chain they might appear. 96 // no matter where in a certificate chain they might appear.
97 std::vector<std::string> blocked_spkis_; 97 std::vector<std::string> blocked_spkis_;
98 }; 98 };
99 99
100 } // namespace net 100 } // namespace net
101 101
102 #endif // NET_CERT_CRL_SET_H_ 102 #endif // NET_CERT_CRL_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698