| 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_OCSP_VERIFY_RESULT_H | 5 #ifndef NET_CERT_OCSP_VERIFY_RESULT_H |
| 6 #define NET_CERT_OCSP_VERIFY_RESULT_H | 6 #define NET_CERT_OCSP_VERIFY_RESULT_H |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| 11 #include "net/cert/ocsp_revocation_status.h" | 11 #include "net/cert/ocsp_revocation_status.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 // The result of OCSP verification. This always contains a ResponseStatus, which | 15 // The result of OCSP verification. This always contains a ResponseStatus, which |
| 16 // describes whether or not an OCSP response was provided, and response level | 16 // describes whether or not an OCSP response was provided, and response level |
| 17 // errors. It optionally contains an OCSPRevocationStatus when |response_status | 17 // errors. It optionally contains an OCSPRevocationStatus when |response_status |
| 18 // = PROVIDED|. For example, a stapled OCSP response matching the certificate, | 18 // = PROVIDED|. For example, a stapled OCSP response matching the certificate, |
| 19 // and indicating a non-revoked status, will have |response_status = PROVIDED| | 19 // and indicating a non-revoked status, will have |response_status = PROVIDED| |
| 20 // and |revocation_status = GOOD|. This is populated as part of the certificate | 20 // and |revocation_status = GOOD|. This is populated as part of the certificate |
| 21 // verification process, and should not be modified at other layers. | 21 // verification process, and should not be modified at other layers. |
| 22 struct NET_EXPORT OCSPVerifyResult { | 22 struct NET_EXPORT OCSPVerifyResult { |
| 23 OCSPVerifyResult(); | 23 OCSPVerifyResult(); |
| 24 OCSPVerifyResult(const OCSPVerifyResult&); | 24 OCSPVerifyResult(const OCSPVerifyResult&); |
| 25 ~OCSPVerifyResult(); | 25 ~OCSPVerifyResult(); |
| 26 | 26 |
| 27 bool operator==(const OCSPVerifyResult& other) const; |
| 28 |
| 27 enum ResponseStatus { | 29 enum ResponseStatus { |
| 28 // No OCSPResponse was stapled. | 30 // No OCSPResponse was stapled. |
| 29 MISSING, | 31 MISSING, |
| 30 | 32 |
| 31 // An up-to-date OCSP response was stapled and matched the certificate. | 33 // An up-to-date OCSP response was stapled and matched the certificate. |
| 32 PROVIDED, | 34 PROVIDED, |
| 33 | 35 |
| 34 // The stapled OCSP response did not have a SUCCESSFUL status. | 36 // The stapled OCSP response did not have a SUCCESSFUL status. |
| 35 ERROR_RESPONSE, | 37 ERROR_RESPONSE, |
| 36 | 38 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 57 ResponseStatus response_status = MISSING; | 59 ResponseStatus response_status = MISSING; |
| 58 | 60 |
| 59 // The strictest CertStatus matching the certificate (REVOKED > UNKNOWN > | 61 // The strictest CertStatus matching the certificate (REVOKED > UNKNOWN > |
| 60 // GOOD). Only valid if |response_status| = PROVIDED. | 62 // GOOD). Only valid if |response_status| = PROVIDED. |
| 61 OCSPRevocationStatus revocation_status = OCSPRevocationStatus::UNKNOWN; | 63 OCSPRevocationStatus revocation_status = OCSPRevocationStatus::UNKNOWN; |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 } // namespace net | 66 } // namespace net |
| 65 | 67 |
| 66 #endif // NET_CERT_OCSP_VERIFY_RESULT_H | 68 #endif // NET_CERT_OCSP_VERIFY_RESULT_H |
| OLD | NEW |