diff options
author | wtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-15 01:55:25 +0000 |
---|---|---|
committer | wtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-15 01:55:25 +0000 |
commit | b89b5632c6d7c222fcef32ee2911d091641eefb7 (patch) | |
tree | f2a3153d7b23cad5a6e0cfcfb2b50f637caf2647 /net/base/ssl_client_socket_win.cc | |
parent | de7e7e59043b4902f7d0043f712aa3b3951e5977 (diff) | |
download | chromium_src-b89b5632c6d7c222fcef32ee2911d091641eefb7.zip chromium_src-b89b5632c6d7c222fcef32ee2911d091641eefb7.tar.gz chromium_src-b89b5632c6d7c222fcef32ee2911d091641eefb7.tar.bz2 |
Add a bucket in the connection type histograms for
intermediate CA certificates containing MD5 signatures.
Change copyright year of new files to 2009.
R=jar
BUG=6102
Review URL: http://codereview.chromium.org/18063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8070 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/ssl_client_socket_win.cc')
-rw-r--r-- | net/base/ssl_client_socket_win.cc | 12 |
1 files changed, 9 insertions, 3 deletions
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. |