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

Unified Diff: net/base/x509_certificate_openssl.cc

Issue 8368015: Record when certificates signed with md[2,4,5] are encountered when using OpenSSL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate_openssl.cc
diff --git a/net/base/x509_certificate_openssl.cc b/net/base/x509_certificate_openssl.cc
index 80e2517a0be870ea269589ab259128772f3246a9..0bdcff0b3967dbf7313288d31a2b4eeaed578572 100644
--- a/net/base/x509_certificate_openssl.cc
+++ b/net/base/x509_certificate_openssl.cc
@@ -475,6 +475,19 @@ int X509Certificate::VerifyInternal(const std::string& hostname,
verified_chain.push_back(cert);
}
+ int sig_alg = OBJ_obj2nid(cert->sig_alg->algorithm);
+ if (sig_alg == NID_md2WithRSAEncryption) {
+ verify_result->has_md2 = true;
+ if (i != 0)
+ verify_result->has_md2_ca = true;
+ } else if (sig_alg == NID_md4WithRSAEncryption) {
+ verify_result->has_md4 = true;
palmer 2011/10/25 19:44:48 Even if we never expect to see it, perhaps we shou
wtc 2011/10/25 20:37:31 Thank you for the suggestion. I should explain wh
+ } else if (sig_alg == NID_md5WithRSAEncryption) {
+ verify_result->has_md5 = true;
+ if (i != 0)
+ verify_result->has_md5_ca = true;
+ }
+
DERCache der_cache;
if (!GetDERAndCacheIfNeeded(cert, &der_cache))
continue;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698