Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_INTERNAL_PARSE_OCSP_H_ | 5 #ifndef NET_CERT_INTERNAL_PARSE_OCSP_H_ |
| 6 #define NET_CERT_INTERNAL_PARSE_OCSP_H_ | 6 #define NET_CERT_INTERNAL_PARSE_OCSP_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/time/time.h" | |
| 12 #include "net/base/hash_value.h" | 13 #include "net/base/hash_value.h" |
| 13 #include "net/cert/internal/parse_certificate.h" | 14 #include "net/cert/internal/parse_certificate.h" |
| 14 #include "net/cert/internal/signature_algorithm.h" | 15 #include "net/cert/internal/signature_algorithm.h" |
| 15 #include "net/der/input.h" | 16 #include "net/der/input.h" |
| 16 #include "net/der/parse_values.h" | 17 #include "net/der/parse_values.h" |
| 17 #include "net/der/parser.h" | 18 #include "net/der/parser.h" |
| 18 #include "net/der/tag.h" | 19 #include "net/der/tag.h" |
| 19 | 20 |
| 20 namespace net { | 21 namespace net { |
| 21 | 22 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 271 // 4.2.2.3), the strictest response is returned (REVOKED > UNKNOWN > GOOD). | 272 // 4.2.2.3), the strictest response is returned (REVOKED > UNKNOWN > GOOD). |
| 272 // | 273 // |
| 273 // On failure |out| has an undefined state. Some of its fields may have been | 274 // On failure |out| has an undefined state. Some of its fields may have been |
| 274 // updated during parsing, whereas others may not have been changed. | 275 // updated during parsing, whereas others may not have been changed. |
| 275 NET_EXPORT_PRIVATE bool GetOCSPCertStatus( | 276 NET_EXPORT_PRIVATE bool GetOCSPCertStatus( |
| 276 const OCSPResponseData& response_data, | 277 const OCSPResponseData& response_data, |
| 277 const der::Input& issuer_tbs_certificate_tlv, | 278 const der::Input& issuer_tbs_certificate_tlv, |
| 278 const der::Input& cert_tbs_certificate_tlv, | 279 const der::Input& cert_tbs_certificate_tlv, |
| 279 OCSPCertStatus* out); | 280 OCSPCertStatus* out); |
| 280 | 281 |
| 282 // Checks that thisUpdate <= verify_time < nextUpdate, and that thisUpdate >= | |
| 283 // verify_time - max_age. | |
|
svaldez
2016/06/23 14:03:15
Might want to reword to "verify_time <= thisUpdate
| |
| 284 NET_EXPORT_PRIVATE bool CheckOCSPDateValid(const OCSPSingleResponse& response, | |
| 285 const base::Time& verify_time, | |
| 286 const base::TimeDelta& max_age); | |
| 287 | |
| 281 } // namespace net | 288 } // namespace net |
| 282 | 289 |
| 283 #endif // NET_CERT_INTERNAL_PARSE_OCSP_H_ | 290 #endif // NET_CERT_INTERNAL_PARSE_OCSP_H_ |
| OLD | NEW |