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

Unified Diff: net/test/spawned_test_server/base_test_server.cc

Issue 1347503002: Add flags to python test server for channel id, extended master secret, and token binding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize new fields in both constructors (fix memory error) Created 5 years, 3 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/test/spawned_test_server/base_test_server.h ('k') | 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/spawned_test_server/base_test_server.cc
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc
index d33d71ae77463e8e571ec193ca76e7be74506c8f..393426ff27a1121475f845d19e5233f981033e25 100644
--- a/net/test/spawned_test_server/base_test_server.cc
+++ b/net/test/spawned_test_server/base_test_server.cc
@@ -111,6 +111,14 @@ bool GetLocalCertificatesDir(const base::FilePath& certificates_dir,
return true;
}
+scoped_ptr<base::ListValue> GetTokenBindingParams(std::vector<int> params) {
+ scoped_ptr<base::ListValue> values(new base::ListValue());
+ for (int param : params) {
+ values->Append(new base::FundamentalValue(param));
+ }
+ return values;
+}
+
} // namespace
BaseTestServer::SSLOptions::SSLOptions()
@@ -127,8 +135,9 @@ BaseTestServer::SSLOptions::SSLOptions()
staple_ocsp_response(false),
ocsp_server_unavailable(false),
enable_npn(false),
- alert_after_handshake(false) {
-}
+ alert_after_handshake(false),
+ disable_channel_id(false),
+ disable_extended_master_secret(false) {}
BaseTestServer::SSLOptions::SSLOptions(
BaseTestServer::SSLOptions::ServerCertificate cert)
@@ -145,8 +154,9 @@ BaseTestServer::SSLOptions::SSLOptions(
staple_ocsp_response(false),
ocsp_server_unavailable(false),
enable_npn(false),
- alert_after_handshake(false) {
-}
+ alert_after_handshake(false),
+ disable_channel_id(false),
+ disable_extended_master_secret(false) {}
BaseTestServer::SSLOptions::~SSLOptions() {}
@@ -548,6 +558,19 @@ bool BaseTestServer::GenerateArguments(base::DictionaryValue* arguments) const {
arguments->Set("enable-npn", base::Value::CreateNullValue());
if (ssl_options_.alert_after_handshake)
arguments->Set("alert-after-handshake", base::Value::CreateNullValue());
+
+ if (ssl_options_.disable_channel_id)
+ arguments->Set("disable-channel-id", base::Value::CreateNullValue());
+ if (ssl_options_.disable_extended_master_secret) {
+ arguments->Set("disable-extended-master-secret",
+ base::Value::CreateNullValue());
+ }
+ if (!ssl_options_.supported_token_binding_params.empty()) {
+ scoped_ptr<base::ListValue> token_binding_params(new base::ListValue());
+ arguments->Set(
+ "token-binding-params",
+ GetTokenBindingParams(ssl_options_.supported_token_binding_params));
+ }
}
return GenerateAdditionalArguments(arguments);
« no previous file with comments | « net/test/spawned_test_server/base_test_server.h ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698