summaryrefslogtreecommitdiffstats
path: root/net/test/spawned_test_server
diff options
context:
space:
mode:
authormshelley@chromium.org <mshelley@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-07 10:07:22 +0000
committermshelley@chromium.org <mshelley@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-07 10:07:22 +0000
commite4738ba510e41318a47bf5acc19f2bf9bfc77c37 (patch)
tree10be6dddc06fa4b0dcf95f25a3ee537461c14f0e /net/test/spawned_test_server
parent66e53d02894643f405f9981681b3b15a59d9075e (diff)
downloadchromium_src-e4738ba510e41318a47bf5acc19f2bf9bfc77c37.zip
chromium_src-e4738ba510e41318a47bf5acc19f2bf9bfc77c37.tar.gz
chromium_src-e4738ba510e41318a47bf5acc19f2bf9bfc77c37.tar.bz2
This CL corrects a bug in which the OnHandshakeComplete callback for an ssl session was never
called if that session had an empty session id (i.e. the session wasn't added to the cache). This CL sets the OpenSSL info_callback such that CheckIfSessionAdded will be run whenever an OpenSSL session has finished its handshake. Previously, CheckIfSessionAdded was called in NewSessionCallbackStatic. NewSessionCallbackStatic is only called when a session is added to the cache. Thus, leading connections with sessions that were not added to the cache would force their pending jobs to wait indefinitely instead of letting the jobs proceed at the completion of the leading job's connection. R=mmenke@chromium.org,rsleevi@chromium.org,wtc@chromium.org, davidben@chromium.org BUG=398967 Review URL: https://codereview.chromium.org/416683002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288024 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test/spawned_test_server')
-rw-r--r--net/test/spawned_test_server/base_test_server.cc10
-rw-r--r--net/test/spawned_test_server/base_test_server.h4
2 files changed, 12 insertions, 2 deletions
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc
index 26608c6..5cc6eb6 100644
--- a/net/test/spawned_test_server/base_test_server.cc
+++ b/net/test/spawned_test_server/base_test_server.cc
@@ -101,7 +101,9 @@ BaseTestServer::SSLOptions::SSLOptions()
tls_intolerance_type(TLS_INTOLERANCE_ALERT),
fallback_scsv_enabled(false),
staple_ocsp_response(false),
- enable_npn(false) {}
+ enable_npn(false),
+ disable_session_cache(false) {
+}
BaseTestServer::SSLOptions::SSLOptions(
BaseTestServer::SSLOptions::ServerCertificate cert)
@@ -116,7 +118,9 @@ BaseTestServer::SSLOptions::SSLOptions(
tls_intolerance_type(TLS_INTOLERANCE_ALERT),
fallback_scsv_enabled(false),
staple_ocsp_response(false),
- enable_npn(false) {}
+ enable_npn(false),
+ disable_session_cache(false) {
+}
BaseTestServer::SSLOptions::~SSLOptions() {}
@@ -474,6 +478,8 @@ bool BaseTestServer::GenerateArguments(base::DictionaryValue* arguments) const {
arguments->Set("staple-ocsp-response", base::Value::CreateNullValue());
if (ssl_options_.enable_npn)
arguments->Set("enable-npn", base::Value::CreateNullValue());
+ if (ssl_options_.disable_session_cache)
+ arguments->Set("disable-session-cache", base::Value::CreateNullValue());
}
return GenerateAdditionalArguments(arguments);
diff --git a/net/test/spawned_test_server/base_test_server.h b/net/test/spawned_test_server/base_test_server.h
index 6dd67db..fb71222 100644
--- a/net/test/spawned_test_server/base_test_server.h
+++ b/net/test/spawned_test_server/base_test_server.h
@@ -203,6 +203,10 @@ class BaseTestServer {
// Whether to enable NPN support.
bool enable_npn;
+
+ // Whether to disable TLS session caching. When session caching is
+ // disabled, the server will generate a new Session ID for every connection.
+ bool disable_session_cache;
};
// Pass as the 'host' parameter during construction to server on 127.0.0.1