| 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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 SSL_get0_alpn_selected(ssl_, &alpn_proto, &alpn_len); | 1105 SSL_get0_alpn_selected(ssl_, &alpn_proto, &alpn_len); |
| 1106 if (alpn_len > 0) { | 1106 if (alpn_len > 0) { |
| 1107 npn_proto_.assign(reinterpret_cast<const char*>(alpn_proto), alpn_len); | 1107 npn_proto_.assign(reinterpret_cast<const char*>(alpn_proto), alpn_len); |
| 1108 npn_status_ = kNextProtoNegotiated; | 1108 npn_status_ = kNextProtoNegotiated; |
| 1109 set_negotiation_extension(kExtensionALPN); | 1109 set_negotiation_extension(kExtensionALPN); |
| 1110 } | 1110 } |
| 1111 } | 1111 } |
| 1112 | 1112 |
| 1113 RecordNegotiationExtension(); | 1113 RecordNegotiationExtension(); |
| 1114 RecordChannelIDSupport(channel_id_service_, channel_id_sent_, | 1114 RecordChannelIDSupport(channel_id_service_, channel_id_sent_, |
| 1115 ssl_config_.channel_id_enabled, | 1115 ssl_config_.channel_id_enabled); |
| 1116 crypto::ECPrivateKey::IsSupported()); | |
| 1117 | 1116 |
| 1118 // Only record OCSP histograms if OCSP was requested. | 1117 // Only record OCSP histograms if OCSP was requested. |
| 1119 if (ssl_config_.signed_cert_timestamps_enabled || | 1118 if (ssl_config_.signed_cert_timestamps_enabled || |
| 1120 cert_verifier_->SupportsOCSPStapling()) { | 1119 cert_verifier_->SupportsOCSPStapling()) { |
| 1121 const uint8_t* ocsp_response; | 1120 const uint8_t* ocsp_response; |
| 1122 size_t ocsp_response_len; | 1121 size_t ocsp_response_len; |
| 1123 SSL_get0_ocsp_response(ssl_, &ocsp_response, &ocsp_response_len); | 1122 SSL_get0_ocsp_response(ssl_, &ocsp_response, &ocsp_response_len); |
| 1124 | 1123 |
| 1125 set_stapled_ocsp_response_received(ocsp_response_len != 0); | 1124 set_stapled_ocsp_response_received(ocsp_response_len != 0); |
| 1126 UMA_HISTOGRAM_BOOLEAN("Net.OCSPResponseStapled", ocsp_response_len != 0); | 1125 UMA_HISTOGRAM_BOOLEAN("Net.OCSPResponseStapled", ocsp_response_len != 0); |
| (...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2151 OnHandshakeIOComplete(signature_result_); | 2150 OnHandshakeIOComplete(signature_result_); |
| 2152 return; | 2151 return; |
| 2153 } | 2152 } |
| 2154 | 2153 |
| 2155 // During a renegotiation, either Read or Write calls may be blocked on an | 2154 // During a renegotiation, either Read or Write calls may be blocked on an |
| 2156 // asynchronous private key operation. | 2155 // asynchronous private key operation. |
| 2157 PumpReadWriteEvents(); | 2156 PumpReadWriteEvents(); |
| 2158 } | 2157 } |
| 2159 | 2158 |
| 2160 } // namespace net | 2159 } // namespace net |
| OLD | NEW |