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); | |
756 | 755 |
757 mode.ConfigureFlag(SSL_MODE_HANDSHAKE_CUTTHROUGH, | 756 mode.ConfigureFlag(SSL_MODE_HANDSHAKE_CUTTHROUGH, |
758 ssl_config_.false_start_enabled); | 757 ssl_config_.false_start_enabled); |
759 | 758 |
760 SSL_set_mode(ssl_, mode.set_mask); | 759 SSL_set_mode(ssl_, mode.set_mask); |
761 SSL_clear_mode(ssl_, mode.clear_mask); | 760 SSL_clear_mode(ssl_, mode.clear_mask); |
762 | 761 |
763 // Removing ciphers by ID from OpenSSL is a bit involved as we must use the | 762 // Removing ciphers by ID from OpenSSL is a bit involved as we must use the |
764 // textual name with SSL_set_cipher_list because there is no public API to | 763 // textual name with SSL_set_cipher_list because there is no public API to |
765 // directly remove a cipher by ID. | 764 // directly remove a cipher by ID. |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1751 ct::SCT_STATUS_LOG_UNKNOWN)); | 1750 ct::SCT_STATUS_LOG_UNKNOWN)); |
1752 } | 1751 } |
1753 } | 1752 } |
1754 | 1753 |
1755 scoped_refptr<X509Certificate> | 1754 scoped_refptr<X509Certificate> |
1756 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { | 1755 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { |
1757 return server_cert_; | 1756 return server_cert_; |
1758 } | 1757 } |
1759 | 1758 |
1760 } // namespace net | 1759 } // namespace net |
OLD | NEW |