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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 649413004: net: disable SSLv3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« chrome/common/localized_error.cc ('K') | « net/ssl/ssl_config.cc ('k') | no next file » | 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 d900069d7fc0a9896894c5767e51d5f080fb49f6..3c7fc79e26cae097fb805aba79a6f78c22b9866a 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -7080,6 +7080,10 @@ class TestSSLConfigService : public SSLConfigService {
rev_checking_required_local_anchors),
fallback_min_version_(0) {}
+ void set_min_version(uint16 version) {
+ min_version_ = version;
+ }
+
void set_fallback_min_version(uint16 version) {
fallback_min_version_ = version;
}
@@ -7094,6 +7098,9 @@ class TestSSLConfigService : public SSLConfigService {
if (fallback_min_version_) {
config->version_fallback_min = fallback_min_version_;
}
+ if (min_version_) {
+ config->version_min = min_version_;
+ }
}
protected:
@@ -7103,6 +7110,7 @@ class TestSSLConfigService : public SSLConfigService {
const bool ev_enabled_;
const bool online_rev_checking_;
const bool rev_checking_required_local_anchors_;
+ uint16 min_version_;
uint16 fallback_min_version_;
};
@@ -7117,6 +7125,7 @@ class FallbackTestURLRequestContext : public TestURLRequestContext {
false /* online revocation checking */,
false /* require rev. checking for local
anchors */);
+ ssl_config_service->set_min_version(SSL_PROTOCOL_VERSION_SSL3);
ssl_config_service->set_fallback_min_version(version);
set_ssl_config_service(ssl_config_service);
}
@@ -7252,7 +7261,7 @@ TEST_F(HTTPSFallbackTest, SSLv3Fallback) {
SpawnedTestServer::SSLOptions::TLS_INTOLERANT_ALL;
ASSERT_NO_FATAL_FAILURE(DoFallbackTest(ssl_options));
- ExpectFailure(ERR_SSL_FALLBACK_BEYOND_MINIMUM_VERSION);
+ ExpectFailure(ERR_SSL_VERSION_OR_CIPHER_MISMATCH);
}
// Tests that the SSLv3 fallback works when explicitly enabled.
@@ -7307,6 +7316,7 @@ TEST_F(HTTPSRequestTest, SSLv3FallbackNoCache) {
TestDelegate delegate;
FallbackTestURLRequestContext context(true);
+ context.set_fallback_min_version(SSL_PROTOCOL_VERSION_TLS1);
davidben 2014/10/29 00:32:05 To make sure I'm not missing something, this is ju
agl 2014/10/29 01:01:18 This triggers a TestSSLConfigService which sets th
davidben 2014/10/29 19:19:33 Acknowledged.
context.Init();
scoped_ptr<URLRequest> request(context.CreateRequest(
test_server.GetURL(std::string()), DEFAULT_PRIORITY, &delegate, NULL));
« chrome/common/localized_error.cc ('K') | « net/ssl/ssl_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698