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

Unified Diff: net/cert/cert_verify_proc_win.cc

Issue 509273002: Detect SHA-1 when it appears in certificate chains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_status_extended
Patch Set: Correct Android comment Created 6 years, 3 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/cert/cert_verify_proc_unittest.cc ('k') | net/cert/cert_verify_result.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc_win.cc
diff --git a/net/cert/cert_verify_proc_win.cc b/net/cert/cert_verify_proc_win.cc
index 5807a5eebe63dd43cc7f2b10f2f963eca1b31d3a..6d841c417b2cc9ad4fcc2a2eff7e25ea02b57932 100644
--- a/net/cert/cert_verify_proc_win.cc
+++ b/net/cert/cert_verify_proc_win.cc
@@ -334,6 +334,13 @@ void GetCertChainInfo(PCCERT_CHAIN_CONTEXT chain_context,
} else if (strcmp(algorithm, szOID_RSA_MD4RSA) == 0) {
// md4WithRSAEncryption: 1.2.840.113549.1.1.3
verify_result->has_md4 = true;
+ } else if (strcmp(algorithm, szOID_RSA_SHA1RSA) == 0 ||
+ strcmp(algorithm, szOID_X957_SHA1DSA) == 0 ||
+ strcmp(algorithm, szOID_ECDSA_SHA1) == 0) {
+ // sha1WithRSAEncryption: 1.2.840.113549.1.1.5
+ // id-dsa-with-sha1: 1.2.840.10040.4.3
+ // ecdsa-with-SHA1: 1.2.840.10045.4.1
+ verify_result->has_sha1 = true;
}
}
« no previous file with comments | « net/cert/cert_verify_proc_unittest.cc ('k') | net/cert/cert_verify_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698