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

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

Issue 280853002: Preserve transport errors for OpenSSL sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rephrase a lot of comments. Created 6 years, 6 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
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(
+ 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());

Powered by Google App Engine
This is Rietveld 408576698