summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/base/connection_type_histograms.cc2
-rw-r--r--net/base/connection_type_histograms.h4
-rw-r--r--net/base/ssl_client_socket_win.cc12
3 files changed, 13 insertions, 5 deletions
diff --git a/net/base/connection_type_histograms.cc b/net/base/connection_type_histograms.cc
index 9edd98d..a5c6610 100644
--- a/net/base/connection_type_histograms.cc
+++ b/net/base/connection_type_histograms.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/net/base/connection_type_histograms.h b/net/base/connection_type_histograms.h
index 8d25664..9290933 100644
--- a/net/base/connection_type_histograms.h
+++ b/net/base/connection_type_histograms.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -23,6 +23,8 @@ enum ConnectionType {
// the certificate chain (excluding root)
CONNECTION_SSL_MD4 = 4, // An SSL connection with an MD4 certificate in
// the certificate chain (excluding root)
+ CONNECTION_SSL_MD5_CA = 5, // An SSL connection with an MD5 CA certificate
+ // in the certificate chain (excluding root)
NUM_OF_CONNECTION_TYPES
};
diff --git a/net/base/ssl_client_socket_win.cc b/net/base/ssl_client_socket_win.cc
index d39c958..9f3248b 100644
--- a/net/base/ssl_client_socket_win.cc
+++ b/net/base/ssl_client_socket_win.cc
@@ -1033,16 +1033,20 @@ void SSLClientSocketWin::LogConnectionTypeMetrics(
bool has_md5 = false;
bool has_md2 = false;
bool has_md4 = false;
+ bool has_md5_ca = false;
- // Each chain starts with the end entity certificate and ends with the root
- // CA certificate. Do not inspect the signature algorithm of the root CA
- // certificate because the signature on the trust anchor is not important.
+ // Each chain starts with the end entity certificate (i = 0) and ends with
+ // the root CA certificate (i = num_elements - 1). Do not inspect the
+ // signature algorithm of the root CA certificate because the signature on
+ // the trust anchor is not important.
for (int i = 0; i < num_elements - 1; ++i) {
PCCERT_CONTEXT cert = element[i]->pCertContext;
const char* algorithm = cert->pCertInfo->SignatureAlgorithm.pszObjId;
if (strcmp(algorithm, szOID_RSA_MD5RSA) == 0) {
// md5WithRSAEncryption: 1.2.840.113549.1.1.4
has_md5 = true;
+ if (i != 0)
+ has_md5_ca = true;
} else if (strcmp(algorithm, szOID_RSA_MD2RSA) == 0) {
// md2WithRSAEncryption: 1.2.840.113549.1.1.2
has_md2 = true;
@@ -1058,6 +1062,8 @@ void SSLClientSocketWin::LogConnectionTypeMetrics(
UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2);
if (has_md4)
UpdateConnectionTypeHistograms(CONNECTION_SSL_MD4);
+ if (has_md5_ca)
+ UpdateConnectionTypeHistograms(CONNECTION_SSL_MD5_CA);
}
// Set server_cert_status_ and return OK or a network error.