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

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

Issue 981723008: Unwind the SSL connection holdback experiment and remove related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename & reformat Created 5 years, 9 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 cert_serial(0), 97 cert_serial(0),
98 request_client_certificate(false), 98 request_client_certificate(false),
99 key_exchanges(SSLOptions::KEY_EXCHANGE_ANY), 99 key_exchanges(SSLOptions::KEY_EXCHANGE_ANY),
100 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY), 100 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY),
101 record_resume(false), 101 record_resume(false),
102 tls_intolerant(TLS_INTOLERANT_NONE), 102 tls_intolerant(TLS_INTOLERANT_NONE),
103 tls_intolerance_type(TLS_INTOLERANCE_ALERT), 103 tls_intolerance_type(TLS_INTOLERANCE_ALERT),
104 fallback_scsv_enabled(false), 104 fallback_scsv_enabled(false),
105 staple_ocsp_response(false), 105 staple_ocsp_response(false),
106 ocsp_server_unavailable(false), 106 ocsp_server_unavailable(false),
107 enable_npn(false), 107 enable_npn(false) {
108 disable_session_cache(false) {
109 } 108 }
110 109
111 BaseTestServer::SSLOptions::SSLOptions( 110 BaseTestServer::SSLOptions::SSLOptions(
112 BaseTestServer::SSLOptions::ServerCertificate cert) 111 BaseTestServer::SSLOptions::ServerCertificate cert)
113 : server_certificate(cert), 112 : server_certificate(cert),
114 ocsp_status(OCSP_OK), 113 ocsp_status(OCSP_OK),
115 cert_serial(0), 114 cert_serial(0),
116 request_client_certificate(false), 115 request_client_certificate(false),
117 key_exchanges(SSLOptions::KEY_EXCHANGE_ANY), 116 key_exchanges(SSLOptions::KEY_EXCHANGE_ANY),
118 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY), 117 bulk_ciphers(SSLOptions::BULK_CIPHER_ANY),
119 record_resume(false), 118 record_resume(false),
120 tls_intolerant(TLS_INTOLERANT_NONE), 119 tls_intolerant(TLS_INTOLERANT_NONE),
121 tls_intolerance_type(TLS_INTOLERANCE_ALERT), 120 tls_intolerance_type(TLS_INTOLERANCE_ALERT),
122 fallback_scsv_enabled(false), 121 fallback_scsv_enabled(false),
123 staple_ocsp_response(false), 122 staple_ocsp_response(false),
124 ocsp_server_unavailable(false), 123 ocsp_server_unavailable(false),
125 enable_npn(false), 124 enable_npn(false) {
126 disable_session_cache(false) {
127 } 125 }
128 126
129 BaseTestServer::SSLOptions::~SSLOptions() {} 127 BaseTestServer::SSLOptions::~SSLOptions() {}
130 128
131 base::FilePath BaseTestServer::SSLOptions::GetCertificateFile() const { 129 base::FilePath BaseTestServer::SSLOptions::GetCertificateFile() const {
132 switch (server_certificate) { 130 switch (server_certificate) {
133 case CERT_OK: 131 case CERT_OK:
134 case CERT_MISMATCHED_NAME: 132 case CERT_MISMATCHED_NAME:
135 return base::FilePath(FILE_PATH_LITERAL("ok_cert.pem")); 133 return base::FilePath(FILE_PATH_LITERAL("ok_cert.pem"));
136 case CERT_EXPIRED: 134 case CERT_EXPIRED:
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 arguments->SetString("signed-cert-timestamps-tls-ext", b64_scts_tls_ext); 477 arguments->SetString("signed-cert-timestamps-tls-ext", b64_scts_tls_ext);
480 } 478 }
481 if (ssl_options_.staple_ocsp_response) 479 if (ssl_options_.staple_ocsp_response)
482 arguments->Set("staple-ocsp-response", base::Value::CreateNullValue()); 480 arguments->Set("staple-ocsp-response", base::Value::CreateNullValue());
483 if (ssl_options_.ocsp_server_unavailable) { 481 if (ssl_options_.ocsp_server_unavailable) {
484 arguments->Set("ocsp-server-unavailable", 482 arguments->Set("ocsp-server-unavailable",
485 base::Value::CreateNullValue()); 483 base::Value::CreateNullValue());
486 } 484 }
487 if (ssl_options_.enable_npn) 485 if (ssl_options_.enable_npn)
488 arguments->Set("enable-npn", base::Value::CreateNullValue()); 486 arguments->Set("enable-npn", base::Value::CreateNullValue());
489 if (ssl_options_.disable_session_cache)
490 arguments->Set("disable-session-cache", base::Value::CreateNullValue());
491 } 487 }
492 488
493 return GenerateAdditionalArguments(arguments); 489 return GenerateAdditionalArguments(arguments);
494 } 490 }
495 491
496 bool BaseTestServer::GenerateAdditionalArguments( 492 bool BaseTestServer::GenerateAdditionalArguments(
497 base::DictionaryValue* arguments) const { 493 base::DictionaryValue* arguments) const {
498 return true; 494 return true;
499 } 495 }
500 496
501 } // namespace net 497 } // 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