Chromium Code Reviews| 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 016c9301edf69ee18bbed20f2805567b0d26eeff..d1bbe31a64572c9ee6f11727fe5fa22488deecfe 100644 |
| --- a/net/test/spawned_test_server/base_test_server.cc |
| +++ b/net/test/spawned_test_server/base_test_server.cc |
| @@ -72,6 +72,21 @@ void GetCiphersList(int cipher, base::ListValue* values) { |
| values->Append(new base::StringValue("3des")); |
| } |
| +std::string GetTLSIntoleranceType( |
|
wtc
2014/06/24 21:33:29
Nit: should this function return a base::StringVal
davidben
2014/06/25 21:19:56
Done. (I kind of wish we did away with these enums
|
| + BaseTestServer::SSLOptions::TLSIntoleranceType type) { |
| + switch (type) { |
| + case BaseTestServer::SSLOptions::TLS_INTOLERANCE_ALERT: |
| + return "alert"; |
| + case BaseTestServer::SSLOptions::TLS_INTOLERANCE_CLOSE: |
| + return "close"; |
| + case BaseTestServer::SSLOptions::TLS_INTOLERANCE_RESET: |
| + return "reset"; |
| + default: |
| + NOTREACHED(); |
| + return ""; |
| + } |
| +} |
| + |
| } // namespace |
| BaseTestServer::SSLOptions::SSLOptions() |
| @@ -83,6 +98,7 @@ BaseTestServer::SSLOptions::SSLOptions() |
| bulk_ciphers(SSLOptions::BULK_CIPHER_ANY), |
| record_resume(false), |
| tls_intolerant(TLS_INTOLERANT_NONE), |
| + tls_intolerance_type(TLS_INTOLERANCE_ALERT), |
| fallback_scsv_enabled(false), |
| staple_ocsp_response(false), |
| enable_npn(false) {} |
| @@ -97,6 +113,7 @@ BaseTestServer::SSLOptions::SSLOptions( |
| bulk_ciphers(SSLOptions::BULK_CIPHER_ANY), |
| record_resume(false), |
| tls_intolerant(TLS_INTOLERANT_NONE), |
| + tls_intolerance_type(TLS_INTOLERANCE_ALERT), |
| fallback_scsv_enabled(false), |
| staple_ocsp_response(false), |
| enable_npn(false) {} |
| @@ -437,6 +454,9 @@ bool BaseTestServer::GenerateArguments(base::DictionaryValue* arguments) const { |
| if (ssl_options_.tls_intolerant != SSLOptions::TLS_INTOLERANT_NONE) { |
| arguments->Set("tls-intolerant", |
| new base::FundamentalValue(ssl_options_.tls_intolerant)); |
| + arguments->Set("tls-intolerance-type", |
| + new base::StringValue(GetTLSIntoleranceType( |
| + ssl_options_.tls_intolerance_type))); |
| } |
| if (ssl_options_.fallback_scsv_enabled) |
| arguments->Set("fallback-scsv", base::Value::CreateNullValue()); |