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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: net/cert/ocsp_verify_result.h
diff --git a/net/cert/ocsp_verify_result.h b/net/cert/ocsp_verify_result.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a27d6ff15fa1b45ff238d16615aaa1c3155d3ff
--- /dev/null
+++ b/net/cert/ocsp_verify_result.h
@@ -0,0 +1,65 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_CERT_OCSP_VERIFY_RESULT_H
+#define NET_CERT_OCSP_VERIFY_RESULT_H
+
+#include <vector>
+
+#include "base/optional.h"
+#include "net/base/net_export.h"
+#include "net/cert/internal/parse_ocsp.h"
+
+namespace net {
+
+class NET_EXPORT OCSPVerifyResult {
+ public:
+ OCSPVerifyResult();
+ OCSPVerifyResult(const OCSPVerifyResult&);
+ ~OCSPVerifyResult();
+
+ void Reset();
+
+ enum ResponseStatus {
+ // No OCSPResponse was stapled.
+ MISSING,
+
+ // An OCSP response was stapled and matched the certificate.
+ PROVIDED,
+
+ // The stapled OCSP response did not have a SUCCESFUL status.
+ BAD_RESPONSE,
+
+ // At least one OCSPSingleResponse was stapled, but none matched the
+ // certificate.
+ NO_MATCHING_RESPONSE,
+
+ // The OCSPResponse structure could not be parsed.
+ PARSE_RESPONSE,
+
+ // The OCSPResponseData structure could not be parsed.
+ PARSE_RESPONSE_DATA,
+ };
+
+ // Stores the validity of a stapled OCSPSingleResponse.
+ struct SingleResult {
+ bool did_parse = false;
+ bool is_date_valid = false;
+ bool is_correct_certificate = false;
+ OCSPCertStatus::Status status = OCSPCertStatus::Status::UNKNOWN;
+ };
+
+ ResponseStatus response_status;
+
+ // The strictest CertStatus matching the certificate. Only present if
+ // |response_status| = OK.
+ base::Optional<OCSPCertStatus::Status> cert_status;
Ryan Sleevi 2016/06/23 22:11:52 Reviewer Feels time: I'd really love to avoid intr
+
+ // Any stapled responses.
Ryan Sleevi 2016/06/23 22:11:52 From the doc and discussion with Emily, I think th
+ std::vector<SingleResult> stapled_responses;
+};
+
+} // namespace net
+
+#endif // NET_CERT_OCSP_VERIFY_RESULT_H

Powered by Google App Engine
This is Rietveld 408576698