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

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: Verify certificate validity. 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
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 dab8bc80c4a29ae9d02c9baa5037290e6b4cfe13..9efb3a02f3043ca53f686369ab2cd443e77903bc 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -162,11 +162,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;
@@ -201,6 +196,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;
Ryan Hamilton 2015/04/10 18:37:36 We actually intend to make use of this feature fir
Bence 2015/04/10 19:55:16 Okay. I started with HTTP/2 tests because there a
if (!session_->params().enable_quic)
return kNoAlternativeService;

Powered by Google App Engine
This is Rietveld 408576698