OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
6 #define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 6 #define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 // a.b.example.com ~ *.example.com --> true | 110 // a.b.example.com ~ *.example.com --> true |
111 // b.example.com ~ *.example.com --> false | 111 // b.example.com ~ *.example.com --> false |
112 bool IsSubDomainOutsideWildcard(const Tokens& hostname) const; | 112 bool IsSubDomainOutsideWildcard(const Tokens& hostname) const; |
113 | 113 |
114 // Returns true if the certificate is a shared certificate. Note - This | 114 // Returns true if the certificate is a shared certificate. Note - This |
115 // function should be used with caution (only for UMA histogram) as an | 115 // function should be used with caution (only for UMA histogram) as an |
116 // attacker could easily get a certificate with more than 5 names in the SAN | 116 // attacker could easily get a certificate with more than 5 names in the SAN |
117 // fields. | 117 // fields. |
118 bool IsCertLikelyFromMultiTenantHosting() const; | 118 bool IsCertLikelyFromMultiTenantHosting() const; |
119 | 119 |
120 // Returns true if the hostname entered and atleast one of the dns names have | |
palmer
2015/07/09 19:33:13
Be more concise and more precise:
Returns true if
Bhanu Dev
2015/07/09 22:49:52
Done.
| |
121 // the same effective domain (eTLD+1). | |
122 bool IsCertLikelyFromSameDomain() const; | |
123 | |
120 static std::vector<Tokens> GetTokenizedDNSNames( | 124 static std::vector<Tokens> GetTokenizedDNSNames( |
121 const std::vector<std::string>& dns_names); | 125 const std::vector<std::string>& dns_names); |
122 | 126 |
123 // If |potential_subdomain| is a subdomain of |parent|, returns the | 127 // If |potential_subdomain| is a subdomain of |parent|, returns the |
124 // number of DNS labels by which |potential_subdomain| is under | 128 // number of DNS labels by which |potential_subdomain| is under |
125 // |parent|. Otherwise, returns 0. | 129 // |parent|. Otherwise, returns 0. |
126 // | 130 // |
127 // For example, | 131 // For example, |
128 // | 132 // |
129 // FindSubDomainDifference(Tokenize("a.b.example.com"), | 133 // FindSubDomainDifference(Tokenize("a.b.example.com"), |
(...skipping 25 matching lines...) Expand all Loading... | |
155 bool captive_portal_probe_completed_; | 159 bool captive_portal_probe_completed_; |
156 // Did the captive portal probe receive an error or get a non-HTTP response? | 160 // Did the captive portal probe receive an error or get a non-HTTP response? |
157 bool captive_portal_no_response_; | 161 bool captive_portal_no_response_; |
158 // Was a captive portal detected? | 162 // Was a captive portal detected? |
159 bool captive_portal_detected_; | 163 bool captive_portal_detected_; |
160 | 164 |
161 content::NotificationRegistrar registrar_; | 165 content::NotificationRegistrar registrar_; |
162 }; | 166 }; |
163 | 167 |
164 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 168 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
OLD | NEW |