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

Unified Diff: net/cert/cert_verify_proc_nss.cc

Issue 22893021: Normalize certificate name verification across all platforms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update cert Created 7 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
« no previous file with comments | « no previous file | net/cert/cert_verify_proc_unittest.cc » ('j') | net/cert/cert_verify_proc_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc_nss.cc
diff --git a/net/cert/cert_verify_proc_nss.cc b/net/cert/cert_verify_proc_nss.cc
index f63297e83c5445d069edfac70be7f2f492b5dd85..0a0743c150d7a5487a6758d423093bf1f21008c2 100644
--- a/net/cert/cert_verify_proc_nss.cc
+++ b/net/cert/cert_verify_proc_nss.cc
@@ -764,8 +764,7 @@ int CertVerifyProcNSS::VerifyInternal(
#endif // defined(OS_IOS)
// Make sure that the hostname matches with the common name of the cert.
- SECStatus status = CERT_VerifyCertName(cert_handle, hostname.c_str());
- if (status != SECSuccess)
+ if (!cert->VerifyNameMatch(hostname))
verify_result->cert_status |= CERT_STATUS_COMMON_NAME_INVALID;
// Make sure that the cert is valid now.
@@ -805,9 +804,9 @@ int CertVerifyProcNSS::VerifyInternal(
CertificateListToCERTCertList(additional_trust_anchors));
}
- status = PKIXVerifyCert(cert_handle, check_revocation, false,
- cert_io_enabled, NULL, 0, trust_anchors.get(),
- cvout);
+ SECStatus status = PKIXVerifyCert(cert_handle, check_revocation, false,
+ cert_io_enabled, NULL, 0,
+ trust_anchors.get(), cvout);
if (status == SECSuccess &&
(flags & CertVerifier::VERIFY_REV_CHECKING_REQUIRED_LOCAL_ANCHORS) &&
« no previous file with comments | « no previous file | net/cert/cert_verify_proc_unittest.cc » ('j') | net/cert/cert_verify_proc_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698