| 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 // TODO(joth): Set this conditionally, see http://crbug.com/55410 | 745 // TODO(joth): Set this conditionally, see http://crbug.com/55410 |
| 746 options.ConfigureFlag(SSL_OP_LEGACY_SERVER_CONNECT, true); | 746 options.ConfigureFlag(SSL_OP_LEGACY_SERVER_CONNECT, true); |
| 747 | 747 |
| 748 SSL_set_options(ssl_, options.set_mask); | 748 SSL_set_options(ssl_, options.set_mask); |
| 749 SSL_clear_options(ssl_, options.clear_mask); | 749 SSL_clear_options(ssl_, options.clear_mask); |
| 750 | 750 |
| 751 // Same as above, this time for the SSL mode. | 751 // Same as above, this time for the SSL mode. |
| 752 SslSetClearMask mode; | 752 SslSetClearMask mode; |
| 753 | 753 |
| 754 mode.ConfigureFlag(SSL_MODE_RELEASE_BUFFERS, true); | 754 mode.ConfigureFlag(SSL_MODE_RELEASE_BUFFERS, true); |
| 755 mode.ConfigureFlag(SSL_MODE_CBC_RECORD_SPLITTING, true); |
| 755 | 756 |
| 756 mode.ConfigureFlag(SSL_MODE_HANDSHAKE_CUTTHROUGH, | 757 mode.ConfigureFlag(SSL_MODE_HANDSHAKE_CUTTHROUGH, |
| 757 ssl_config_.false_start_enabled); | 758 ssl_config_.false_start_enabled); |
| 758 | 759 |
| 759 SSL_set_mode(ssl_, mode.set_mask); | 760 SSL_set_mode(ssl_, mode.set_mask); |
| 760 SSL_clear_mode(ssl_, mode.clear_mask); | 761 SSL_clear_mode(ssl_, mode.clear_mask); |
| 761 | 762 |
| 762 // Removing ciphers by ID from OpenSSL is a bit involved as we must use the | 763 // Removing ciphers by ID from OpenSSL is a bit involved as we must use the |
| 763 // textual name with SSL_set_cipher_list because there is no public API to | 764 // textual name with SSL_set_cipher_list because there is no public API to |
| 764 // directly remove a cipher by ID. | 765 // directly remove a cipher by ID. |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1750 ct::SCT_STATUS_LOG_UNKNOWN)); | 1751 ct::SCT_STATUS_LOG_UNKNOWN)); |
| 1751 } | 1752 } |
| 1752 } | 1753 } |
| 1753 | 1754 |
| 1754 scoped_refptr<X509Certificate> | 1755 scoped_refptr<X509Certificate> |
| 1755 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { | 1756 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { |
| 1756 return server_cert_; | 1757 return server_cert_; |
| 1757 } | 1758 } |
| 1758 | 1759 |
| 1759 } // namespace net | 1760 } // namespace net |
| OLD | NEW |