authorgravatar for nash1111@users.noreply.github.comnash1111 <nash1111@users.noreply.github.com> 2026-01-10 14:52:50+09:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-10 22:11:52+01:00
log9a7f14354e30c3f66135f07ba721c232e79f3740
tree2a84bed1111a56082d63ee95b633dde188ad9854
parentf3db3a087ef5b51880498b5a363c3741743e8020

crypto: correct checkHostName docs about wildcard matching


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/crypto/Certificate.zig+2-2
......@@ -341,8 +341,8 @@ pub const Parsed = struct {
341341 // the certificate (e.g., more than one DNSName name, a match in any one
342342 // of the set is considered acceptable.) Names may contain the wildcard
343343 // character * which is considered to match any single domain name
344 // component or component fragment. E.g., *.a.com matches foo.a.com but
345 // not bar.foo.a.com. f*.com matches foo.com but not bar.com.
344 // component. E.g., *.a.com matches foo.a.com but not bar.foo.a.com.
345 // Partial wildcards like f*.com are not supported.
346346 fn checkHostName(host_name: []const u8, dns_name: []const u8) bool {
347347 // Empty strings should not match
348348 if (host_name.len == 0 or dns_name.len == 0) return false;