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

Unified Diff: net/base/ssl_client_socket_win.cc

Issue 18063: Add a bucket in the connection type histograms for... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/connection_type_histograms.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ssl_client_socket_win.cc
===================================================================
--- net/base/ssl_client_socket_win.cc (revision 7967)
+++ net/base/ssl_client_socket_win.cc (working copy)
@@ -1033,16 +1033,20 @@
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 @@
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.
« no previous file with comments | « net/base/connection_type_histograms.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698