| 270 | return (a.size() == b.size()) && ToString(a).to_lower() == ToString(b).to_lower(); |
| 271 | } |
| 272 | bool MatchDomainName(TStringBuf tmpl, TStringBuf name) { |
| 273 | // match wildcards only in the left-most part |
| 274 | // do not support (optional according to RFC) partial wildcards (ww*.yandex.ru) |
| 275 | // see RFC-6125 |
| 276 | TStringBuf tmplRest = tmpl; |
| 277 | TStringBuf tmplFirst = tmplRest.NextTok('.'); |
| 278 | if (tmplFirst == "*") { |
| 279 | tmpl = tmplRest; |
| 280 | name.NextTok('.'); |
| 281 | } |
| 282 | return EqualNoCase(tmpl, name); |
| 283 | } |
| 284 | |
| 285 | EMatchResult MatchCertAltNames(X509* cert, TStringBuf hostname) { |
| 286 | EMatchResult result = NO_MATCH; |
no test coverage detected