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

Side by Side Diff: net/test/spawned_test_server/base_test_server.cc

Issue 1351133002: Revert of 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: 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/test/spawned_test_server/base_test_server.h" 5 #include "net/test/spawned_test_server/base_test_server.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 base::FilePath src_dir; 106 base::FilePath src_dir;
107 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir)) 107 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir))
108 return false; 108 return false;
109 109
110 *local_certificates_dir = src_dir.Append(certificates_dir); 110 *local_certificates_dir = src_dir.Append(certificates_dir);
111 return true; 111 return true;
112 } 112 }
113 113
114 scoped_ptr<base::ListValue> GetTokenBindingParams(std::vector<int> params) {
115 scoped_ptr<base::ListValue> values(new base::ListValue());
116 for (int param : params) {
117 values->Append(new base::FundamentalValue(param));
118 }
119 return values;
120 }
121
122 } // namespace 114 } // namespace
123 115
124 BaseTestServer::SSLOptions::SSLOptions() 116 BaseTestServer::SSLOptions::SSLOptions()
125 : server_certificate(CERT_OK), 117 : server_certificate(CERT_OK),
126 ocsp_status(OCSP_OK), 118 ocsp_status(OCSP_OK),
127 cert_serial(0), 119 cert_serial(0),
128 request_client_certificate(false), 120 request_client_certificate(false),
129 key_exchanges(SSLOptions::KEY_EXCHANGE_ANY), 121 key_exchanges(SSLOptions::KEY_EXCHANGE_ANY),
130 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY), 122 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY),
131 record_resume(false), 123 record_resume(false),
132 tls_intolerant(TLS_INTOLERANT_NONE), 124 tls_intolerant(TLS_INTOLERANT_NONE),
133 tls_intolerance_type(TLS_INTOLERANCE_ALERT), 125 tls_intolerance_type(TLS_INTOLERANCE_ALERT),
134 fallback_scsv_enabled(false), 126 fallback_scsv_enabled(false),
135 staple_ocsp_response(false), 127 staple_ocsp_response(false),
136 ocsp_server_unavailable(false), 128 ocsp_server_unavailable(false),
137 enable_npn(false), 129 enable_npn(false),
138 alert_after_handshake(false), 130 alert_after_handshake(false) {
139 disable_channel_id(false), 131 }
140 disable_extended_master_secret(false) {}
141 132
142 BaseTestServer::SSLOptions::SSLOptions( 133 BaseTestServer::SSLOptions::SSLOptions(
143 BaseTestServer::SSLOptions::ServerCertificate cert) 134 BaseTestServer::SSLOptions::ServerCertificate cert)
144 : server_certificate(cert), 135 : server_certificate(cert),
145 ocsp_status(OCSP_OK), 136 ocsp_status(OCSP_OK),
146 cert_serial(0), 137 cert_serial(0),
147 request_client_certificate(false), 138 request_client_certificate(false),
148 key_exchanges(SSLOptions::KEY_EXCHANGE_ANY), 139 key_exchanges(SSLOptions::KEY_EXCHANGE_ANY),
149 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY), 140 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY),
150 record_resume(false), 141 record_resume(false),
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 if (ssl_options_.staple_ocsp_response) 541 if (ssl_options_.staple_ocsp_response)
551 arguments->Set("staple-ocsp-response", base::Value::CreateNullValue()); 542 arguments->Set("staple-ocsp-response", base::Value::CreateNullValue());
552 if (ssl_options_.ocsp_server_unavailable) { 543 if (ssl_options_.ocsp_server_unavailable) {
553 arguments->Set("ocsp-server-unavailable", 544 arguments->Set("ocsp-server-unavailable",
554 base::Value::CreateNullValue()); 545 base::Value::CreateNullValue());
555 } 546 }
556 if (ssl_options_.enable_npn) 547 if (ssl_options_.enable_npn)
557 arguments->Set("enable-npn", base::Value::CreateNullValue()); 548 arguments->Set("enable-npn", base::Value::CreateNullValue());
558 if (ssl_options_.alert_after_handshake) 549 if (ssl_options_.alert_after_handshake)
559 arguments->Set("alert-after-handshake", base::Value::CreateNullValue()); 550 arguments->Set("alert-after-handshake", base::Value::CreateNullValue());
560
561 if (ssl_options_.disable_channel_id)
562 arguments->Set("disable-channel-id", base::Value::CreateNullValue());
563 if (ssl_options_.disable_extended_master_secret) {
564 arguments->Set("disable-extended-master-secret",
565 base::Value::CreateNullValue());
566 }
567 if (!ssl_options_.supported_token_binding_params.empty()) {
568 scoped_ptr<base::ListValue> token_binding_params(new base::ListValue());
569 arguments->Set(
570 "token-binding-params",
571 GetTokenBindingParams(ssl_options_.supported_token_binding_params));
572 }
573 } 551 }
574 552
575 return GenerateAdditionalArguments(arguments); 553 return GenerateAdditionalArguments(arguments);
576 } 554 }
577 555
578 bool BaseTestServer::GenerateAdditionalArguments( 556 bool BaseTestServer::GenerateAdditionalArguments(
579 base::DictionaryValue* arguments) const { 557 base::DictionaryValue* arguments) const {
580 return true; 558 return true;
581 } 559 }
582 560
583 } // namespace net 561 } // namespace net
OLDNEW
« 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