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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 20799005: Also allow ALPN to enable TLS False Start. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_nss.cc
===================================================================
--- net/socket/ssl_client_socket_nss.cc (revision 215057)
+++ net/socket/ssl_client_socket_nss.cc (working copy)
@@ -1281,13 +1281,18 @@
// unsafe to call SSL_OptionSet in a renegotiation because the "first
// handshake" lock isn't already held, which will result in an assertion
// failure in the ssl_Get1stHandshakeLock call in SSL_OptionSet.
- PRBool npn;
+ PRBool negotiated_extension;
SECStatus rv = SSL_HandshakeNegotiatedExtension(socket,
ssl_next_proto_nego_xtn,
- &npn);
- if (rv != SECSuccess || !npn) {
- // If the server doesn't support NPN, then we don't do False Start with
- // it.
+ &negotiated_extension);
+ if (rv != SECSuccess || !negotiated_extension) {
+ rv = SSL_HandshakeNegotiatedExtension(socket,
+ ssl_application_layer_protocol,
+ &negotiated_extension);
+ }
+ if (rv != SECSuccess || !negotiated_extension) {
+ // If the server doesn't support NPN or ALPN, then we don't do False
+ // Start with it.
SSL_OptionSet(socket, SSL_ENABLE_FALSE_START, PR_FALSE);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698