code wiki / _hdl_build / nx_cert_registry.nx

nx_cert_registry.nx

buildroot/runtime/_hdl_build/nx_cert_registry.nx

5080 B103 linesdepth 2pulls 2 transitivereach 8 importersview sourcekind librarytopic cert
docsdependenciesstructsconstsfunctions

about

nx_cert_registry.nx -- the S-CLASS DATA-DRIVEN CERT REGISTRY (SNI host -> per-domain TLS chain+key). The LOGIC core that RETIRES the hardcoded single cert (NX_SD2_CERT_PATH) AND the per-domain consts. PURE: a cert TABLE (data) + a ClientHello SNI host -> the matched (chain_path, key_path). Semantics: EXACT host beats a '*.domain' WILDCARD beats the '*' DEFAULT; the wildcard is LABEL-SAFE + ANTI-SPOOF (`*.nishifamily.com` matches `www.nishifamily.com` but NEVER `evilnishifamily.com` nor `a.b.nishifamily.com`); case-insensitive (DNS). Consumes the rows nx_domain_forge emits (certs_generated.conf). Operator: "fix the hardcoding ... s-class exceed." Table row (space/TAB-delim; '#'=comment): <host|*.domain|*> <chain_path> <key_path>. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_cert_registry.nx nx_cert_loader.nx nx_cert_registry_gate.nx nx_site_dispatch.nx

imports: nx_syscalls.nx

imported by: nx_cert_loader.nxnx_cert_registry_gate.nxnx_site_dispatch.nx

structs

none

consts

none

functions

10func cr_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c }
11func cr_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: cr_tok_eq_ci
13func cr_eol(b: *u8, n: i64, st: i64) -> i64
called by 2: cr_matchsd_vhost
18func cr_is_sep(c: i64) -> i64 { if c == 32 { return 1 } if c == 9 { return 1 } return 0 }
called by 1: cr_split
19func cr_split(b: *u8, ls: i64, le: i64, offs: *i64, lens: *i64, maxf: i64) -> i64
called by 2: cr_matchsd_vhost calls 1: cr_is_sep
32func cr_copyz(dst: *u8, src: *u8, off: i64, len: i64) -> i64 { var i: i64 = 0; while i < len { dst[i] = src[off + i]; i = i + 1 } dst[len] = 0 as u8; return len }
called by 2: cr_matchsd_vhost
35func cr_tok_eq_ci(a: *u8, ao: i64, al: i64, tok: *u8) -> i64
called by 1: cr_match calls 2: cr_slencr_lc
43func cr_host_eq_ci(a: *u8, ao: i64, al: i64, b: *u8, bn: i64) -> i64
called by 2: cr_matchsd_vhost calls 1: cr_lc
53func cr_wild_match(host: *u8, hn: i64, pat: *u8, po: i64, pl: i64) -> i64
called by 1: cr_match calls 1: cr_lc
71func cr_match(tab: *u8, n: i64, host: *u8, hn: i64, chainbuf: *u8, keybuf: *u8) -> i64