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

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: Created 6 years, 4 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
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 37651a761863078a28f124531fd491a2a07cc4fa..a9d3416f22c3f344318d57c1fcc0bef0932e4ff6 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;
}
}

Powered by Google App Engine
This is Rietveld 408576698