Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: net/socket/ssl_client_socket_openssl.cc

Issue 797693003: Add a histogram for session resumption version mismatches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rsleevi comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 if (!start_cert_verification_time_.is_null()) { 1124 if (!start_cert_verification_time_.is_null()) {
1125 base::TimeDelta verify_time = 1125 base::TimeDelta verify_time =
1126 base::TimeTicks::Now() - start_cert_verification_time_; 1126 base::TimeTicks::Now() - start_cert_verification_time_;
1127 if (result == OK) { 1127 if (result == OK) {
1128 UMA_HISTOGRAM_TIMES("Net.SSLCertVerificationTime", verify_time); 1128 UMA_HISTOGRAM_TIMES("Net.SSLCertVerificationTime", verify_time);
1129 } else { 1129 } else {
1130 UMA_HISTOGRAM_TIMES("Net.SSLCertVerificationTimeError", verify_time); 1130 UMA_HISTOGRAM_TIMES("Net.SSLCertVerificationTimeError", verify_time);
1131 } 1131 }
1132 } 1132 }
1133 1133
1134 if (result == OK) 1134 if (result == OK) {
1135 RecordConnectionTypeMetrics(GetNetSSLVersion(ssl_)); 1135 RecordConnectionTypeMetrics(GetNetSSLVersion(ssl_));
1136 1136
1137 if (SSL_session_reused(ssl_)) {
1138 // Record whether or not the server tried to resume a session for a
1139 // different version. See https://crbug.com/441456.
1140 UMA_HISTOGRAM_BOOLEAN(
1141 "Net.SSLSessionVersionMatch",
1142 SSL_version(ssl_) == SSL_get_session(ssl_)->ssl_version);
1143 }
1144 }
1145
1137 const CertStatus cert_status = server_cert_verify_result_.cert_status; 1146 const CertStatus cert_status = server_cert_verify_result_.cert_status;
1138 if (transport_security_state_ && 1147 if (transport_security_state_ &&
1139 (result == OK || 1148 (result == OK ||
1140 (IsCertificateError(result) && IsCertStatusMinorError(cert_status))) && 1149 (IsCertificateError(result) && IsCertStatusMinorError(cert_status))) &&
1141 !transport_security_state_->CheckPublicKeyPins( 1150 !transport_security_state_->CheckPublicKeyPins(
1142 host_and_port_.host(), 1151 host_and_port_.host(),
1143 server_cert_verify_result_.is_issued_by_known_root, 1152 server_cert_verify_result_.is_issued_by_known_root,
1144 server_cert_verify_result_.public_key_hashes, 1153 server_cert_verify_result_.public_key_hashes,
1145 &pinning_failure_log_)) { 1154 &pinning_failure_log_)) {
1146 result = ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN; 1155 result = ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN;
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 ct::SCT_STATUS_LOG_UNKNOWN)); 1912 ct::SCT_STATUS_LOG_UNKNOWN));
1904 } 1913 }
1905 } 1914 }
1906 1915
1907 scoped_refptr<X509Certificate> 1916 scoped_refptr<X509Certificate>
1908 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { 1917 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const {
1909 return server_cert_; 1918 return server_cert_;
1910 } 1919 }
1911 1920
1912 } // namespace net 1921 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698