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

Unified Diff: net/test/base_test_server.cc

Issue 11175002: testserver.py TLS and client auth support on WebSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add crbug Created 8 years, 2 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 | « no previous file | net/tools/testserver/testserver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/base_test_server.cc
diff --git a/net/test/base_test_server.cc b/net/test/base_test_server.cc
index e672f19207355171bdd30a2fe7e8ce98c8560213..7ca7f7ffc550715557ea48060cb06d25896c3484 100644
--- a/net/test/base_test_server.cc
+++ b/net/test/base_test_server.cc
@@ -339,9 +339,7 @@ bool BaseTestServer::GenerateArguments(base::DictionaryValue* arguments) const {
if (VLOG_IS_ON(1) || log_to_console_)
arguments->Set("log-to-console", base::Value::CreateNullValue());
- if (type_ == TYPE_HTTPS) {
- arguments->Set("https", base::Value::CreateNullValue());
-
+ if (UsingSSL(type_)) {
// Check the certificate arguments of the HTTPS server.
FilePath certificate_path(certificates_dir_);
FilePath certificate_file(ssl_options_.GetCertificateFile());
@@ -356,10 +354,6 @@ bool BaseTestServer::GenerateArguments(base::DictionaryValue* arguments) const {
arguments->SetString("cert-and-key-file", certificate_path.value());
}
- std::string ocsp_arg = ssl_options_.GetOCSPArgument();
- if (!ocsp_arg.empty())
- arguments->SetString("ocsp", ocsp_arg);
-
// Check the client certificate related arguments.
if (ssl_options_.request_client_certificate)
arguments->Set("ssl-client-auth", base::Value::CreateNullValue());
@@ -378,6 +372,14 @@ bool BaseTestServer::GenerateArguments(base::DictionaryValue* arguments) const {
if (ssl_client_certs->GetSize())
arguments->Set("ssl-client-ca", ssl_client_certs.release());
+ }
+
+ if (type_ == TYPE_HTTPS) {
+ arguments->Set("https", base::Value::CreateNullValue());
+
+ std::string ocsp_arg = ssl_options_.GetOCSPArgument();
+ if (!ocsp_arg.empty())
+ arguments->SetString("ocsp", ocsp_arg);
// Check bulk cipher argument.
scoped_ptr<base::ListValue> bulk_cipher_values(new base::ListValue());
« no previous file with comments | « no previous file | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698