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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 662543005: net: allow False Start only for >= TLS 1.2 && AEAD && forward-secure && ALPN/NPN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Drop False Start tests in Chrome. 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
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_nss.cc
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index e20b28a3512b05b67dbfbbc2a9a4d05a9f7fc206..efcac80c5ddcce158a5c497bb50ab3c0f39cbb01 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -107,6 +107,7 @@
#include "net/socket/client_socket_handle.h"
#include "net/socket/nss_ssl_util.h"
#include "net/ssl/ssl_cert_request_info.h"
+#include "net/ssl/ssl_cipher_suite_names.h"
#include "net/ssl/ssl_connection_status_flags.h"
#include "net/ssl/ssl_info.h"
@@ -1601,6 +1602,17 @@ SECStatus SSLClientSocketNSS::Core::CanFalseStartCallback(
return SECSuccess;
}
+ SSLChannelInfo channel_info;
+ SECStatus ok = SSL_GetChannelInfo(socket,
+ &channel_info, sizeof(channel_info));
+ if (ok != SECSuccess ||
+ channel_info.length != sizeof(channel_info) ||
+ channel_info.protocolVersion < SSL_LIBRARY_VERSION_TLS_1_2 ||
+ !IsSecureTLSCipherSuite(channel_info.cipherSuite)) {
+ *can_false_start = PR_FALSE;
+ return SECSuccess;
+ }
+
return SSL_RecommendedCanFalseStart(socket, can_false_start);
}
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698