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

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: Optional was optional. 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
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 "base/optional.h"
Ryan Sleevi 2016/07/18 22:56:37 unneeded
dadrian 2016/07/18 23:20:26 Done.
11 #include "net/base/net_export.h"
12 #include "net/cert/ocsp_revocation_status.h"
13
14 namespace net {
15
16 // The result of OCSP verification. This always contains a ResponseStatus, which
17 // describes whether or not an OCSP response was provided, and response level
18 // errors. It optionally contains an OCSPRevocationStatus when |response_status
19 // = PROVIDED|. For example, a stapled OCSP response matching the certificate,
20 // and indicating a non-revoked status, will have |response_status = PROVIDED|
21 // and |revocation_status = GOOD|. This is populated as part of the certificate
22 // verification process, and should not be modified at other layers.
23 struct NET_EXPORT OCSPVerifyResult {
24 OCSPVerifyResult();
25 OCSPVerifyResult(const OCSPVerifyResult&);
26 ~OCSPVerifyResult();
27
28 enum ResponseStatus {
29 // No OCSPResponse was stapled.
30 MISSING,
31
32 // An up-to-date OCSP response was stapled and matched the certificate.
33 PROVIDED,
34
35 // The stapled OCSP response did not have a SUCCESSFUL status.
36 ERROR_RESPONSE,
37
38 // The OCSPResponseData field producedAt was outside the certificate
39 // validity period.
40 BAD_PRODUCED_AT,
41
42 // At least one OCSPSingleResponse was stapled, but none matched the
43 // certificate.
44 NO_MATCHING_RESPONSE,
45
46 // A matching OCSPSingleResponse was stapled, but was either expired or not
47 // yet valid.
48 INVALID_DATE,
49
50 // The OCSPResponse structure could not be parsed.
51 PARSE_RESPONSE_ERROR,
52
53 // The OCSPResponseData structure could not be parsed.
54 PARSE_RESPONSE_DATA_ERROR,
55
56 };
57
58 ResponseStatus response_status = MISSING;
59
60 // The strictest CertStatus matching the certificate (REVOKED > UNKNOWN >
61 // GOOD). Only valid if |response_status| = PROVIDED.
62 OCSPRevocationStatus revocation_status = OCSPRevocationStatus::UNKNOWN;
63 };
64
65 } // namespace net
66
67 #endif // NET_CERT_OCSP_VERIFY_RESULT_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698