OLD | NEW |
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 <errno.h> | 10 #include <errno.h> |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 // TODO(joth): Set this conditionally, see http://crbug.com/55410 | 738 // TODO(joth): Set this conditionally, see http://crbug.com/55410 |
739 options.ConfigureFlag(SSL_OP_LEGACY_SERVER_CONNECT, true); | 739 options.ConfigureFlag(SSL_OP_LEGACY_SERVER_CONNECT, true); |
740 | 740 |
741 SSL_set_options(ssl_, options.set_mask); | 741 SSL_set_options(ssl_, options.set_mask); |
742 SSL_clear_options(ssl_, options.clear_mask); | 742 SSL_clear_options(ssl_, options.clear_mask); |
743 | 743 |
744 // Same as above, this time for the SSL mode. | 744 // Same as above, this time for the SSL mode. |
745 SslSetClearMask mode; | 745 SslSetClearMask mode; |
746 | 746 |
747 mode.ConfigureFlag(SSL_MODE_RELEASE_BUFFERS, true); | 747 mode.ConfigureFlag(SSL_MODE_RELEASE_BUFFERS, true); |
| 748 mode.ConfigureFlag(SSL_MODE_CBC_RECORD_SPLITTING, true); |
748 | 749 |
749 mode.ConfigureFlag(SSL_MODE_HANDSHAKE_CUTTHROUGH, | 750 mode.ConfigureFlag(SSL_MODE_HANDSHAKE_CUTTHROUGH, |
750 ssl_config_.false_start_enabled); | 751 ssl_config_.false_start_enabled); |
751 | 752 |
752 SSL_set_mode(ssl_, mode.set_mask); | 753 SSL_set_mode(ssl_, mode.set_mask); |
753 SSL_clear_mode(ssl_, mode.clear_mask); | 754 SSL_clear_mode(ssl_, mode.clear_mask); |
754 | 755 |
755 // Removing ciphers by ID from OpenSSL is a bit involved as we must use the | 756 // Removing ciphers by ID from OpenSSL is a bit involved as we must use the |
756 // textual name with SSL_set_cipher_list because there is no public API to | 757 // textual name with SSL_set_cipher_list because there is no public API to |
757 // directly remove a cipher by ID. | 758 // directly remove a cipher by ID. |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 if (handshake_succeeded_ && marked_session_as_good_) | 1656 if (handshake_succeeded_ && marked_session_as_good_) |
1656 OnHandshakeCompletion(); | 1657 OnHandshakeCompletion(); |
1657 } | 1658 } |
1658 | 1659 |
1659 scoped_refptr<X509Certificate> | 1660 scoped_refptr<X509Certificate> |
1660 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { | 1661 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { |
1661 return server_cert_; | 1662 return server_cert_; |
1662 } | 1663 } |
1663 | 1664 |
1664 } // namespace net | 1665 } // namespace net |
OLD | NEW |