OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_CERT_OCSP_VERIFY_RESULT_H |
| 6 #define NET_CERT_OCSP_VERIFY_RESULT_H |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/optional.h" |
| 11 #include "net/base/net_export.h" |
| 12 #include "net/cert/ocsp_revocation_status.h" |
| 13 |
| 14 namespace net { |
| 15 |
| 16 struct NET_EXPORT OCSPVerifyResult { |
| 17 OCSPVerifyResult(); |
| 18 OCSPVerifyResult(const OCSPVerifyResult&); |
| 19 ~OCSPVerifyResult(); |
| 20 |
| 21 void Reset(); |
| 22 |
| 23 enum ResponseStatus { |
| 24 // No OCSPResponse was stapled. |
| 25 MISSING, |
| 26 |
| 27 // An up-to-date OCSP response was stapled and matched the certificate. |
| 28 PROVIDED, |
| 29 |
| 30 // The stapled OCSP response did not have a SUCCESFUL status. |
| 31 BAD_RESPONSE, |
| 32 |
| 33 // The OCSPResponseData field producedAt was outside the certificate |
| 34 // validity period. |
| 35 BAD_PRODUCED_AT, |
| 36 |
| 37 // At least one OCSPSingleResponse was stapled, but none matched the |
| 38 // certificate. |
| 39 NO_MATCHING_RESPONSE, |
| 40 |
| 41 // A matching OCSPSingleResponse was stapled, but was either expired or not |
| 42 // yet valid. |
| 43 INVALID_DATE, |
| 44 |
| 45 // The OCSPResponse structure could not be parsed. |
| 46 PARSE_RESPONSE, |
| 47 |
| 48 // The OCSPResponseData structure could not be parsed. |
| 49 PARSE_RESPONSE_DATA, |
| 50 |
| 51 }; |
| 52 |
| 53 ResponseStatus response_status; |
| 54 |
| 55 // The strictest CertStatus matching the certificate (REVOKED > UNKNOWN > |
| 56 // GOOD). Only present if |response_status| = PROVIDED. |
| 57 base::Optional<OCSPRevocationStatus> cert_status; |
| 58 }; |
| 59 |
| 60 } // namespace net |
| 61 |
| 62 #endif // NET_CERT_OCSP_VERIFY_RESULT_H |
OLD | NEW |