summaryrefslogtreecommitdiffstats
path: root/net/test
diff options
context:
space:
mode:
Diffstat (limited to 'net/test')
-rw-r--r--net/test/base_test_server.cc16
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());