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

Unified Diff: net/test/spawned_test_server/base_test_server.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: Add tests for REVOKED status 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/test/spawned_test_server/base_test_server.h
diff --git a/net/test/spawned_test_server/base_test_server.h b/net/test/spawned_test_server/base_test_server.h
index 48568010f65577a07c24b369a5bfda14618e300a..cfa5e33d32cb4975612c142122aad89f1589a422 100644
--- a/net/test/spawned_test_server/base_test_server.h
+++ b/net/test/spawned_test_server/base_test_server.h
@@ -86,6 +86,15 @@ class BaseTestServer {
OCSP_UNKNOWN,
};
+ // OCSPDate enumerates the date ranges for OCSP responses that the
+ // testserver can produce
+ enum OCSPDate {
+ OCSP_VALID,
+ OCSP_OLD,
+ OCSP_EARLY,
+ OCSP_LONG,
+ };
+
// Bitmask of key exchange algorithms that the test server supports and that
// can be selectively enabled or disabled.
enum KeyExchange {
@@ -151,6 +160,10 @@ class BaseTestServer {
// the empty string if there is none.
std::string GetOCSPArgument() const;
+ // GetOCSPArgument returns the value of the OCSP date argument to testserver
+ // or the empty string if there is none.
+ std::string GetOCSPDateArgument() const;
+
// The certificate to use when serving requests.
ServerCertificate server_certificate;
@@ -158,6 +171,10 @@ class BaseTestServer {
// response returned.
OCSPStatus ocsp_status;
+ // If |server_certificate==CERT_AUTO| then this determines the date range
+ // set on the OCSP response returned.
+ OCSPDate ocsp_date;
+
// If not zero, |cert_serial| will be the serial number of the
// auto-generated leaf certificate when |server_certificate==CERT_AUTO|.
uint64_t cert_serial;

Powered by Google App Engine
This is Rietveld 408576698