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

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

Issue 2100303002: Add OCSPVerifyResult for tracking stapled OCSP responses cross-platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ocsp-date-check
Patch Set: Remaining nits. Created 4 years, 5 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
« no previous file with comments | « net/cert/ocsp_revocation_status.h ('k') | net/cert/ocsp_verify_result.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 "net/base/net_export.h"
11 #include "net/cert/ocsp_revocation_status.h"
12
13 namespace net {
14
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
17 // errors. It optionally contains an OCSPRevocationStatus when |response_status
18 // = PROVIDED|. For example, a stapled OCSP response matching the certificate,
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
21 // verification process, and should not be modified at other layers.
22 struct NET_EXPORT OCSPVerifyResult {
23 OCSPVerifyResult();
24 OCSPVerifyResult(const OCSPVerifyResult&);
25 ~OCSPVerifyResult();
26
27 enum ResponseStatus {
28 // No OCSPResponse was stapled.
29 MISSING,
30
31 // An up-to-date OCSP response was stapled and matched the certificate.
32 PROVIDED,
33
34 // The stapled OCSP response did not have a SUCCESSFUL status.
35 ERROR_RESPONSE,
36
37 // The OCSPResponseData field producedAt was outside the certificate
38 // validity period.
39 BAD_PRODUCED_AT,
40
41 // At least one OCSPSingleResponse was stapled, but none matched the
42 // certificate.
43 NO_MATCHING_RESPONSE,
44
45 // A matching OCSPSingleResponse was stapled, but was either expired or not
46 // yet valid.
47 INVALID_DATE,
48
49 // The OCSPResponse structure could not be parsed.
50 PARSE_RESPONSE_ERROR,
51
52 // The OCSPResponseData structure could not be parsed.
53 PARSE_RESPONSE_DATA_ERROR,
54
55 };
56
57 ResponseStatus response_status = MISSING;
58
59 // The strictest CertStatus matching the certificate (REVOKED > UNKNOWN >
60 // GOOD). Only valid if |response_status| = PROVIDED.
61 OCSPRevocationStatus revocation_status = OCSPRevocationStatus::UNKNOWN;
62 };
63
64 } // namespace net
65
66 #endif // NET_CERT_OCSP_VERIFY_RESULT_H
OLDNEW
« no previous file with comments | « net/cert/ocsp_revocation_status.h ('k') | net/cert/ocsp_verify_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698