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

Unified Diff: net/cert/cert_verify_proc.cc

Issue 2454553002: Revert of Reduce buggy usage of the registry controlled domain service. (Closed)
Patch Set: Created 4 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 | « net/base/url_util.cc ('k') | net/cert/x509_certificate.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 c2c5930c305abd0a79d9eaf0767f7e659675cb3a..a182b4628d06e3e9f046be43a4627a47e121cf08 100644
--- a/net/cert/cert_verify_proc.cc
+++ b/net/cert/cert_verify_proc.cc
@@ -565,11 +565,13 @@
if (host_info.IsIPAddress())
continue;
+ const size_t registry_len = registry_controlled_domains::GetRegistryLength(
+ dns_name,
+ registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES,
+ registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);
// If the name is not in a known TLD, ignore it. This permits internal
// names.
- if (!registry_controlled_domains::HostHasRegistryControlledDomain(
- dns_name, registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES,
- registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES))
+ if (registry_len == 0)
continue;
for (size_t j = 0; domains[j][0]; ++j) {
« no previous file with comments | « net/base/url_util.cc ('k') | net/cert/x509_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698