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

Unified Diff: net/quic/quic_http_stream.cc

Issue 189513006: Fail QUIC requests for secure resources over insecure connections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 6 years, 9 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_http_stream.cc
diff --git a/net/quic/quic_http_stream.cc b/net/quic/quic_http_stream.cc
index 661562f764a8863dfa6d63e23579251b0e497ac6..2ceac958873d1cda3af221949b402f691158a13b 100644
--- a/net/quic/quic_http_stream.cc
+++ b/net/quic/quic_http_stream.cc
@@ -59,6 +59,13 @@ int QuicHttpStream::InitializeStream(const HttpRequestInfo* request_info,
return was_handshake_confirmed_ ? ERR_CONNECTION_CLOSED :
ERR_QUIC_HANDSHAKE_FAILED;
+ if (request_info->url.SchemeIsSecure()) {
+ SSLInfo ssl_info;
+ if (!session_->GetSSLInfo(&ssl_info) || !ssl_info.cert) {
+ return ERR_REQUEST_FOR_SECURE_RESOURCE_OVER_INSECURE_QUIC;
+ }
+ }
+
stream_net_log_ = stream_net_log;
request_info_ = request_info;
priority_ = priority;
« no previous file with comments | « net/base/net_error_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698