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

Unified Diff: net/base/x509_certificate_win.cc

Issue 8374020: Make it a fatal SSL error when encountering certs signed with md[2,4], and interstitial md5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wtc feedback Created 9 years 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/x509_certificate_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate_win.cc
diff --git a/net/base/x509_certificate_win.cc b/net/base/x509_certificate_win.cc
index c04ff4d0284e1d6c05ab488dfc0d8da0a7404d3a..c672dfc6f0ef0fb631b6aa30da7c8f4308c343e0 100644
--- a/net/base/x509_certificate_win.cc
+++ b/net/base/x509_certificate_win.cc
@@ -866,6 +866,7 @@ int X509Certificate::VerifyInternal(const std::string& hostname,
chain_flags,
NULL, // reserved
&chain_context)) {
+ verify_result->cert_status |= CERT_STATUS_INVALID;
return MapSecurityError(GetLastError());
}
@@ -884,6 +885,7 @@ int X509Certificate::VerifyInternal(const std::string& hostname,
chain_flags,
NULL, // reserved
&chain_context)) {
+ verify_result->cert_status |= CERT_STATUS_INVALID;
return MapSecurityError(GetLastError());
}
}
@@ -894,14 +896,6 @@ int X509Certificate::VerifyInternal(const std::string& hostname,
verify_result->cert_status |= MapCertChainErrorStatusToCertStatus(
chain_context->TrustStatus.dwErrorStatus);
- // Treat certificates signed using broken signature algorithms as invalid.
- if (verify_result->has_md4)
- verify_result->cert_status |= CERT_STATUS_INVALID;
-
- // Flag certificates signed using weak signature algorithms.
- if (verify_result->has_md2)
- verify_result->cert_status |= CERT_STATUS_WEAK_SIGNATURE_ALGORITHM;
-
// Flag certificates that have a Subject common name with a NULL character.
if (CertSubjectCommonNameHasNull(cert_handle_))
verify_result->cert_status |= CERT_STATUS_INVALID;
« no previous file with comments | « net/base/x509_certificate_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698