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

Unified Diff: net/test/base_test_server.h

Issue 9663017: net: add OCSP tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 9 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
« no previous file with comments | « net/ocsp/nss_ocsp.cc ('k') | net/test/base_test_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/base_test_server.h
diff --git a/net/test/base_test_server.h b/net/test/base_test_server.h
index 38f755dde8bcbf17d26c5358dff1d6e16b036a05..c2aee14fea328e672959d8f4dfa073221dbd2302 100644
--- a/net/test/base_test_server.h
+++ b/net/test/base_test_server.h
@@ -46,6 +46,11 @@ class BaseTestServer {
struct HTTPSOptions {
enum ServerCertificate {
CERT_OK,
+
+ // CERT_AUTO causes the testserver to generate a test certificate issued
+ // by "Testing CA" (see net/data/ssl/certificates/ocsp-test-root.pem).
+ CERT_AUTO,
+
CERT_MISMATCHED_NAME,
CERT_EXPIRED,
// Cross-signed certificate to test PKIX path building. Contains an
@@ -55,6 +60,14 @@ class BaseTestServer {
CERT_CHAIN_WRONG_ROOT,
};
+ // OCSPStatus enumerates the types of OCSP response that the testserver
+ // can produce.
+ enum OCSPStatus {
+ OCSP_OK,
+ OCSP_REVOKED,
+ OCSP_INVALID,
+ };
+
// Bitmask of bulk encryption algorithms that the test server supports
// and that can be selectively enabled or disabled.
enum BulkCipher {
@@ -83,9 +96,17 @@ class BaseTestServer {
// |server_certificate|.
FilePath GetCertificateFile() const;
+ // GetOCSPArgument returns the value of any OCSP argument to testserver or
+ // the empty string if there is none.
+ std::string GetOCSPArgument() const;
+
// The certificate to use when serving requests.
ServerCertificate server_certificate;
+ // If |server_certificate==CERT_AUTO| then this determines the type of OCSP
+ // response returned.
+ OCSPStatus ocsp_status;
+
// True if a CertificateRequest should be sent to the client during
// handshaking.
bool request_client_certificate;
« no previous file with comments | « net/ocsp/nss_ocsp.cc ('k') | net/test/base_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698