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

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: Always pass ocsp_response to verifier. 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"
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 {
estark 2016/07/14 21:14:58 probably could use some documentation on this clas
dadrian 2016/07/15 01:00:50 Done.
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.
estark 2016/07/14 21:14:58 missing an S in SUCCESSFUL
dadrian 2016/07/15 01:00:50 I'm an adult who can spell things, I swear!
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;
estark 2016/07/14 21:14:58 Hmm, I wonder if this should be called |revocation
dadrian 2016/07/15 01:00:50 It should probably be |revocation_status|. It was
58 };
59
60 } // namespace net
61
62 #endif // NET_CERT_OCSP_VERIFY_RESULT_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698