diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 05:05:51 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 05:05:51 +0000 |
commit | fcb0f644c83064a695588aa74d755aff74a51286 (patch) | |
tree | 0c9a15514a53cb0ef02c96c8de6d3bb3e626e0a3 /net/test | |
parent | 3efb1b624c74fbdc04a81c4dd186606a097fbfe5 (diff) | |
download | chromium_src-fcb0f644c83064a695588aa74d755aff74a51286.zip chromium_src-fcb0f644c83064a695588aa74d755aff74a51286.tar.gz chromium_src-fcb0f644c83064a695588aa74d755aff74a51286.tar.bz2 |
testserver.py TLS and client auth support on WebSocket.
BUG=136950
Review URL: https://chromiumcodereview.appspot.com/11175002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162653 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test')
-rw-r--r-- | net/test/base_test_server.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/test/base_test_server.cc b/net/test/base_test_server.cc index e672f19..7ca7f7f 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()); |