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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 291093002: Fail the SPDY transaction if it does not meet TLS base requirements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address forgotten comment. Created 6 years, 7 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/base/net_error_list.h ('k') | net/net.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index b360beee4418a65b5050f36f2840834f90255a72..15a37a1dc04ad3145005c187ff558c9b586d0f97 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -1120,18 +1120,25 @@ int HttpStreamFactoryImpl::Job::DoCreateStream() {
SpdySessionPool* spdy_pool = session_->spdy_session_pool();
spdy_session = spdy_pool->FindAvailableSession(spdy_session_key, net_log_);
if (!spdy_session) {
- new_spdy_session_ =
+ base::WeakPtr<SpdySession> new_spdy_session =
spdy_pool->CreateAvailableSessionFromSocket(spdy_session_key,
connection_.Pass(),
net_log_,
spdy_certificate_error_,
using_ssl_);
+ if (!new_spdy_session->HasAcceptableTransportSecurity()) {
+ new_spdy_session->CloseSessionOnError(
+ ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY, "");
+ return ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY;
+ }
+
+ new_spdy_session_ = new_spdy_session;
+ spdy_session_direct_ = direct;
const HostPortPair& host_port_pair = spdy_session_key.host_port_pair();
base::WeakPtr<HttpServerProperties> http_server_properties =
session_->http_server_properties();
if (http_server_properties)
http_server_properties->SetSupportsSpdy(host_port_pair, true);
- spdy_session_direct_ = direct;
// Create a SpdyHttpStream attached to the session;
// OnNewSpdySessionReadyCallback is not called until an event loop
« no previous file with comments | « net/base/net_error_list.h ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698