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

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

Issue 2040513003: Implement Expect-Staple (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move OCSP into cert_verify_proc Created 4 years, 6 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 <vector>
9
10 #include "base/optional.h"
11 #include "net/base/net_export.h"
12 #include "net/cert/internal/parse_ocsp.h"
13
14 namespace net {
15
16 class NET_EXPORT OCSPVerifyResult {
17 public:
18 OCSPVerifyResult();
19 OCSPVerifyResult(const OCSPVerifyResult&);
20 ~OCSPVerifyResult();
21
22 void Reset();
23
24 enum ResponseStatus {
25 // No OCSPResponse was stapled.
26 MISSING,
27
28 // An OCSP response was stapled and matched the certificate.
29 PROVIDED,
30
31 // The stapled OCSP response did not have a SUCCESFUL status.
32 BAD_RESPONSE,
33
34 // At least one OCSPSingleResponse was stapled, but none matched the
35 // certificate.
36 NO_MATCHING_RESPONSE,
37
38 // The OCSPResponse structure could not be parsed.
39 PARSE_RESPONSE,
40
41 // The OCSPResponseData structure could not be parsed.
42 PARSE_RESPONSE_DATA,
43 };
44
45 // Stores the validity of a stapled OCSPSingleResponse.
46 struct SingleResult {
47 bool did_parse = false;
48 bool is_date_valid = false;
49 bool is_correct_certificate = false;
50 OCSPCertStatus::Status status = OCSPCertStatus::Status::UNKNOWN;
51 };
52
53 ResponseStatus response_status;
54
55 // The strictest CertStatus matching the certificate. Only present if
56 // |response_status| = OK.
57 base::Optional<OCSPCertStatus::Status> cert_status;
Ryan Sleevi 2016/06/23 22:11:52 Reviewer Feels time: I'd really love to avoid intr
58
59 // Any stapled responses.
Ryan Sleevi 2016/06/23 22:11:52 From the doc and discussion with Emily, I think th
60 std::vector<SingleResult> stapled_responses;
61 };
62
63 } // namespace net
64
65 #endif // NET_CERT_OCSP_VERIFY_RESULT_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698