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

Side by Side Diff: net/socket/ssl_client_socket_openssl.cc

Issue 214593009: Enable False Start for OpenSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Punt webview ifdefs (only our openssl is supported) Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // OpenSSL binding for SSLClientSocket. The class layout and general principle 5 // OpenSSL binding for SSLClientSocket. The class layout and general principle
6 // of operation is derived from SSLClientSocketNSS. 6 // of operation is derived from SSLClientSocketNSS.
7 7
8 #include "net/socket/ssl_client_socket_openssl.h" 8 #include "net/socket/ssl_client_socket_openssl.h"
9 9
10 #include <openssl/err.h> 10 #include <openssl/err.h>
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 SslSetClearMask mode; 848 SslSetClearMask mode;
849 849
850 #if defined(SSL_MODE_RELEASE_BUFFERS) 850 #if defined(SSL_MODE_RELEASE_BUFFERS)
851 mode.ConfigureFlag(SSL_MODE_RELEASE_BUFFERS, true); 851 mode.ConfigureFlag(SSL_MODE_RELEASE_BUFFERS, true);
852 #endif 852 #endif
853 853
854 #if defined(SSL_MODE_SMALL_BUFFERS) 854 #if defined(SSL_MODE_SMALL_BUFFERS)
855 mode.ConfigureFlag(SSL_MODE_SMALL_BUFFERS, true); 855 mode.ConfigureFlag(SSL_MODE_SMALL_BUFFERS, true);
856 #endif 856 #endif
857 857
858 mode.ConfigureFlag(SSL_MODE_HANDSHAKE_CUTTHROUGH,
859 ssl_config_.false_start_enabled);
860
858 SSL_set_mode(ssl_, mode.set_mask); 861 SSL_set_mode(ssl_, mode.set_mask);
859 SSL_clear_mode(ssl_, mode.clear_mask); 862 SSL_clear_mode(ssl_, mode.clear_mask);
860 863
861 // Removing ciphers by ID from OpenSSL is a bit involved as we must use the 864 // Removing ciphers by ID from OpenSSL is a bit involved as we must use the
862 // textual name with SSL_set_cipher_list because there is no public API to 865 // textual name with SSL_set_cipher_list because there is no public API to
863 // directly remove a cipher by ID. 866 // directly remove a cipher by ID.
864 STACK_OF(SSL_CIPHER)* ciphers = SSL_get_ciphers(ssl_); 867 STACK_OF(SSL_CIPHER)* ciphers = SSL_get_ciphers(ssl_);
865 DCHECK(ciphers); 868 DCHECK(ciphers);
866 // See SSLConfig::disabled_cipher_suites for description of the suites 869 // See SSLConfig::disabled_cipher_suites for description of the suites
867 // disabled by default. Note that !SHA256 and !SHA384 only remove HMAC-SHA256 870 // disabled by default. Note that !SHA256 and !SHA384 only remove HMAC-SHA256
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 #endif 1581 #endif
1579 return SSL_TLSEXT_ERR_OK; 1582 return SSL_TLSEXT_ERR_OK;
1580 } 1583 }
1581 1584
1582 scoped_refptr<X509Certificate> 1585 scoped_refptr<X509Certificate>
1583 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { 1586 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const {
1584 return server_cert_; 1587 return server_cert_;
1585 } 1588 }
1586 1589
1587 } // namespace net 1590 } // namespace net
OLDNEW
« 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