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 #include "net/socket/ssl_client_socket_impl.h" | 5 #include "net/socket/ssl_client_socket_impl.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <openssl/bio.h> | 8 #include <openssl/bio.h> |
9 #include <openssl/bytestring.h> | 9 #include <openssl/bytestring.h> |
10 #include <openssl/err.h> | 10 #include <openssl/err.h> |
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 } | 1174 } |
1175 | 1175 |
1176 const uint8_t* sct_list; | 1176 const uint8_t* sct_list; |
1177 size_t sct_list_len; | 1177 size_t sct_list_len; |
1178 SSL_get0_signed_cert_timestamp_list(ssl_, &sct_list, &sct_list_len); | 1178 SSL_get0_signed_cert_timestamp_list(ssl_, &sct_list, &sct_list_len); |
1179 set_signed_cert_timestamps_received(sct_list_len != 0); | 1179 set_signed_cert_timestamps_received(sct_list_len != 0); |
1180 | 1180 |
1181 if (IsRenegotiationAllowed()) | 1181 if (IsRenegotiationAllowed()) |
1182 SSL_set_renegotiate_mode(ssl_, ssl_renegotiate_freely); | 1182 SSL_set_renegotiate_mode(ssl_, ssl_renegotiate_freely); |
1183 | 1183 |
1184 uint8_t server_key_exchange_hash = SSL_get_server_key_exchange_hash(ssl_); | 1184 uint16_t signature_algorithm = SSL_get_peer_signature_algorithm(ssl_); |
1185 if (server_key_exchange_hash != TLSEXT_hash_none) { | 1185 if (signature_algorithm != 0) { |
1186 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSLServerKeyExchangeHash", | 1186 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.SSLSignatureAlgorithm", |
1187 server_key_exchange_hash); | 1187 signature_algorithm); |
1188 } | 1188 } |
1189 | 1189 |
1190 // Verify the certificate. | 1190 // Verify the certificate. |
1191 UpdateServerCert(); | 1191 UpdateServerCert(); |
1192 next_handshake_state_ = STATE_VERIFY_CERT; | 1192 next_handshake_state_ = STATE_VERIFY_CERT; |
1193 return OK; | 1193 return OK; |
1194 } | 1194 } |
1195 | 1195 |
1196 int SSLClientSocketImpl::DoChannelIDLookup() { | 1196 int SSLClientSocketImpl::DoChannelIDLookup() { |
1197 NetLog::ParametersCallback callback = base::Bind( | 1197 NetLog::ParametersCallback callback = base::Bind( |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2290 if (rv != OK) { | 2290 if (rv != OK) { |
2291 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv); | 2291 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, rv); |
2292 return; | 2292 return; |
2293 } | 2293 } |
2294 | 2294 |
2295 net_log_.EndEvent(NetLog::TYPE_SSL_CONNECT, | 2295 net_log_.EndEvent(NetLog::TYPE_SSL_CONNECT, |
2296 base::Bind(&NetLogSSLInfoCallback, base::Unretained(this))); | 2296 base::Bind(&NetLogSSLInfoCallback, base::Unretained(this))); |
2297 } | 2297 } |
2298 | 2298 |
2299 } // namespace net | 2299 } // namespace net |
OLD | NEW |