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 #include "net/cert/crl_set.h" | 5 #include "net/cert/crl_set.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 return REVOKED; | 56 return REVOKED; |
57 } | 57 } |
58 | 58 |
59 return GOOD; | 59 return GOOD; |
60 } | 60 } |
61 | 61 |
62 bool CRLSet::IsExpired() const { | 62 bool CRLSet::IsExpired() const { |
63 if (not_after_ == 0) | 63 if (not_after_ == 0) |
64 return false; | 64 return false; |
65 | 65 |
66 uint64 now = base::Time::Now().ToTimeT(); | 66 uint64_t now = base::Time::Now().ToTimeT(); |
67 return now > not_after_; | 67 return now > not_after_; |
68 } | 68 } |
69 | 69 |
70 uint32 CRLSet::sequence() const { | 70 uint32_t CRLSet::sequence() const { |
71 return sequence_; | 71 return sequence_; |
72 } | 72 } |
73 | 73 |
74 const CRLSet::CRLList& CRLSet::crls() const { | 74 const CRLSet::CRLList& CRLSet::crls() const { |
75 return crls_; | 75 return crls_; |
76 } | 76 } |
77 | 77 |
78 // static | 78 // static |
79 CRLSet* CRLSet::EmptyCRLSetForTesting() { | 79 CRLSet* CRLSet::EmptyCRLSetForTesting() { |
80 return ForTesting(false, NULL, ""); | 80 return ForTesting(false, NULL, ""); |
(...skipping 17 matching lines...) Expand all Loading... |
98 crl_set->crls_index_by_issuer_[spki] = 0; | 98 crl_set->crls_index_by_issuer_[spki] = 0; |
99 } | 99 } |
100 | 100 |
101 if (!serial_number.empty()) | 101 if (!serial_number.empty()) |
102 crl_set->crls_[0].second.push_back(serial_number); | 102 crl_set->crls_[0].second.push_back(serial_number); |
103 | 103 |
104 return crl_set; | 104 return crl_set; |
105 } | 105 } |
106 | 106 |
107 } // namespace net | 107 } // namespace net |
OLD | NEW |