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

Unified Diff: net/cert/cert_verify_proc.cc

Issue 2433583002: Reduce buggy usage of the registry controlled domain service. (Closed)
Patch Set: Fix 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
Index: net/cert/cert_verify_proc.cc
diff --git a/net/cert/cert_verify_proc.cc b/net/cert/cert_verify_proc.cc
index 8fdd93cbb1bb0c4720273867ee9c9de3fb723ed6..57ed53f029eb1d9f2d4d3a2a1fceaa060a083948 100644
--- a/net/cert/cert_verify_proc.cc
+++ b/net/cert/cert_verify_proc.cc
@@ -531,13 +531,11 @@ static bool CheckNameConstraints(const std::vector<std::string>& dns_names,
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_len == 0)
Peter Kasting 2016/10/22 05:04:20 We don't need to worry about a behavioral change d
brettw 2016/10/24 21:45:24 No, because the name is canonical (it would be sli
+ if (!registry_controlled_domains::HostHasRegistryControlledDomain(
+ dns_name, registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES,
+ registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES))
continue;
for (size_t j = 0; domains[j][0]; ++j) {

Powered by Google App Engine
This is Rietveld 408576698