Index: net/cert/x509_certificate.cc |
diff --git a/net/cert/x509_certificate.cc b/net/cert/x509_certificate.cc |
index 880d487308be1cf7d85f47f7d41efe76739d6320..02e02344a9970bfb8d7543ff022e17dcf8e3255e 100644 |
--- a/net/cert/x509_certificate.cc |
+++ b/net/cert/x509_certificate.cc |
@@ -629,27 +629,16 @@ bool X509Certificate::VerifyHostname( |
if (presented_domain != reference_domain) |
continue; |
- base::StringPiece pattern_begin, pattern_end; |
- SplitOnChar(presented_host, '*', &pattern_begin, &pattern_end); |
- |
- if (pattern_end.empty()) { // No '*' in the presented_host |
+ if (presented_host != "*") { |
if (presented_host == reference_host) |
return true; |
continue; |
} |
- pattern_end.remove_prefix(1); // move past the * |
if (!allow_wildcards) |
continue; |
- // * must not match a substring of an IDN A label; just a whole fragment. |
- if (reference_host.starts_with("xn--") && |
- !(pattern_begin.empty() && pattern_end.empty())) |
- continue; |
- |
- if (reference_host.starts_with(pattern_begin) && |
- reference_host.ends_with(pattern_end)) |
- return true; |
+ return true; |
} |
return false; |
} |