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

Unified Diff: net/cert/cert_verify_proc.cc

Issue 2725683002: Move name matching into the shared certificate validator (Closed)
Patch Set: Created 3 years, 10 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_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc.cc
diff --git a/net/cert/cert_verify_proc.cc b/net/cert/cert_verify_proc.cc
index d946256101271119c9d3f0f68ddb53651f1aa8cf..175deb6329c4a99f79bd11f29a7da595653e5aef 100644
--- a/net/cert/cert_verify_proc.cc
+++ b/net/cert/cert_verify_proc.cc
@@ -485,6 +485,12 @@ int CertVerifyProc::Verify(X509Certificate* cert,
ComputeSignatureHashAlgorithms(verify_result);
+ if (!cert->VerifyNameMatch(hostname,
+ &verify_result->common_name_fallback_used)) {
+ verify_result->cert_status |= CERT_STATUS_COMMON_NAME_INVALID;
+ rv = MapCertStatusToNetError(verify_result->cert_status);
+ }
+
UMA_HISTOGRAM_BOOLEAN("Net.CertCommonNameFallback",
verify_result->common_name_fallback_used);
if (!verify_result->is_issued_by_known_root) {
« no previous file with comments | « no previous file | net/cert/cert_verify_proc_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698