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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 2056343006: Remove DHE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: actually connect up the feature flag Created 4 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
« no previous file with comments | « net/ssl/ssl_config.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index cd41ebba004bd5a806f7ee4d2799f6c29f36fc2d..82b3cc71353a617b527e2dca513578747e9fde19 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -8655,6 +8655,33 @@ TEST_F(HTTPSRequestTest, HSTSCrossOriginAddHeaders) {
EXPECT_EQ(kOriginHeaderValue, received_cors_header);
}
+// Test that DHE-only servers fail with the expected dedicated error code.
+TEST_F(HTTPSRequestTest, DHE) {
+ SpawnedTestServer::SSLOptions ssl_options;
+ ssl_options.key_exchanges =
+ SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA;
+ SpawnedTestServer test_server(
+ SpawnedTestServer::TYPE_HTTPS, ssl_options,
+ base::FilePath(FILE_PATH_LITERAL("net/data/ssl")));
+ ASSERT_TRUE(test_server.Start());
+
+ TestDelegate d;
+ {
+ std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
+ test_server.GetURL("/defaultresponse"), DEFAULT_PRIORITY, &d));
+
+ r->Start();
+ EXPECT_TRUE(r->is_pending());
+
+ base::RunLoop().Run();
+
+ EXPECT_EQ(1, d.response_started_count());
+ EXPECT_FALSE(r->status().is_success());
+ EXPECT_EQ(URLRequestStatus::FAILED, r->status().status());
+ EXPECT_EQ(ERR_SSL_OBSOLETE_CIPHER, r->status().error());
+ }
+}
+
namespace {
class SSLClientAuthTestDelegate : public TestDelegate {
« no previous file with comments | « net/ssl/ssl_config.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698