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

Unified Diff: net/cert/cert_verify_proc_openssl.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_openssl.cc
diff --git a/net/cert/cert_verify_proc_openssl.cc b/net/cert/cert_verify_proc_openssl.cc
index 7643240dbca73463bb235fae701df17bbc95b035..a74bbc35d0e78d93825ed2cda9dc0545de029d7e 100644
--- a/net/cert/cert_verify_proc_openssl.cc
+++ b/net/cert/cert_verify_proc_openssl.cc
@@ -117,8 +117,14 @@ void GetCertChainInfo(X509_STORE_CTX* store_ctx,
verify_result->has_md2 = true;
} else if (sig_alg == NID_md4WithRSAEncryption) {
verify_result->has_md4 = true;
- } else if (sig_alg == NID_md5WithRSAEncryption) {
+ } else if (sig_alg == NID_md5WithRSAEncryption ||
+ sig_alg == NID_md5WithRSA) {
verify_result->has_md5 = true;
+ } else if (sig_alg == NID_sha1WithRSAEncryption ||
+ sig_alg == NID_dsaWithSHA || sig_alg == NID_dsaWithSHA1 ||
+ sig_alg == NID_dsaWithSHA1_2 || sig_alg == NID_sha1WithRSA ||
davidben 2014/08/28 19:42:08 Aside: BoringSSL actually can't verify DSA signatu
Ryan Sleevi 2014/09/26 20:18:43 Right, I'm fairly certain it will be an error befo
+ sig_alg == NID_ecdsa_with_SHA1) {
+ verify_result->has_sha1 = true;
}
}
}

Powered by Google App Engine
This is Rietveld 408576698