| 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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 } | 947 } |
| 948 | 948 |
| 949 if (ssl_config_.signed_cert_timestamps_enabled) { | 949 if (ssl_config_.signed_cert_timestamps_enabled) { |
| 950 SSL_enable_signed_cert_timestamps(ssl_); | 950 SSL_enable_signed_cert_timestamps(ssl_); |
| 951 SSL_enable_ocsp_stapling(ssl_); | 951 SSL_enable_ocsp_stapling(ssl_); |
| 952 } | 952 } |
| 953 | 953 |
| 954 if (cert_verifier_->SupportsOCSPStapling()) | 954 if (cert_verifier_->SupportsOCSPStapling()) |
| 955 SSL_enable_ocsp_stapling(ssl_); | 955 SSL_enable_ocsp_stapling(ssl_); |
| 956 | 956 |
| 957 // Enable fastradio padding. | |
| 958 SSL_enable_fastradio_padding(ssl_, | |
| 959 ssl_config_.fastradio_padding_enabled && | |
| 960 ssl_config_.fastradio_padding_eligible); | |
| 961 | |
| 962 // By default, renegotiations are rejected. After the initial handshake | 957 // By default, renegotiations are rejected. After the initial handshake |
| 963 // completes, some application protocols may re-enable it. | 958 // completes, some application protocols may re-enable it. |
| 964 SSL_set_reject_peer_renegotiations(ssl_, 1); | 959 SSL_set_reject_peer_renegotiations(ssl_, 1); |
| 965 | 960 |
| 966 return OK; | 961 return OK; |
| 967 } | 962 } |
| 968 | 963 |
| 969 void SSLClientSocketOpenSSL::DoReadCallback(int rv) { | 964 void SSLClientSocketOpenSSL::DoReadCallback(int rv) { |
| 970 // Since Run may result in Read being called, clear |user_read_callback_| | 965 // Since Run may result in Read being called, clear |user_read_callback_| |
| 971 // up front. | 966 // up front. |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2147 OnHandshakeIOComplete(signature_result_); | 2142 OnHandshakeIOComplete(signature_result_); |
| 2148 return; | 2143 return; |
| 2149 } | 2144 } |
| 2150 | 2145 |
| 2151 // During a renegotiation, either Read or Write calls may be blocked on an | 2146 // During a renegotiation, either Read or Write calls may be blocked on an |
| 2152 // asynchronous private key operation. | 2147 // asynchronous private key operation. |
| 2153 PumpReadWriteEvents(); | 2148 PumpReadWriteEvents(); |
| 2154 } | 2149 } |
| 2155 | 2150 |
| 2156 } // namespace net | 2151 } // namespace net |
| OLD | NEW |