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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 1074193003: Verify alternative server certificate validity for origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit. Created 5 years, 8 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/http/http_network_transaction_unittest.cc ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl.cc
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index 0397acaeec1495238a2ff3f2d3cd4c3d054de1b4..1867d6d38b341491923307d9afa62ab95faef108 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -159,11 +159,6 @@ AlternativeService HttpStreamFactoryImpl::GetAlternativeServiceFor(
if (alternative_service.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL)
return kNoAlternativeService;
- // TODO(bnc): Make sure that callers connect to the specified host, and that
- // certificate requirements are enforced. Then remove the following two
- // lines.
- if (alternative_service.host != origin.host())
- return kNoAlternativeService;
if (http_server_properties.IsAlternativeServiceBroken(alternative_service)) {
HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_BROKEN);
return kNoAlternativeService;
@@ -198,6 +193,10 @@ AlternativeService HttpStreamFactoryImpl::GetAlternativeServiceFor(
}
DCHECK_EQ(QUIC, alternative_service.protocol);
+ // TODO(bnc): Make sure that certificate requirements are enforced when using
+ // QUIC, then remove the following two lines.
+ if (alternative_service.host != origin.host())
+ return kNoAlternativeService;
if (!session_->params().enable_quic)
return kNoAlternativeService;
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698