code wiki / _hdl_build / nx_cert_registry.nx
nx_cert_registry.nx
buildroot/runtime/_hdl_build/nx_cert_registry.nx
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
imports: nx_syscalls.nx
imported by: nx_cert_loader.nxnx_cert_registry_gate.nxnx_site_dispatch.nx
structs
| none |
consts
| none |
functions
| 10 | func cr_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c } |
| 11 | func 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 |
| 13 | func cr_eol(b: *u8, n: i64, st: i64) -> i64 |
| 18 | func cr_is_sep(c: i64) -> i64 { if c == 32 { return 1 } if c == 9 { return 1 } return 0 } called by 1: cr_split |
| 19 | func cr_split(b: *u8, ls: i64, le: i64, offs: *i64, lens: *i64, maxf: i64) -> i64 |
| 32 | func 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 } |
| 35 | func cr_tok_eq_ci(a: *u8, ao: i64, al: i64, tok: *u8) -> i64 |
| 43 | func cr_host_eq_ci(a: *u8, ao: i64, al: i64, b: *u8, bn: i64) -> i64 |
| 53 | func cr_wild_match(host: *u8, hn: i64, pat: *u8, po: i64, pl: i64) -> i64 |
| 71 | func cr_match(tab: *u8, n: i64, host: *u8, hn: i64, chainbuf: *u8, keybuf: *u8) -> i64 called by 4: cl_loadg_chainmainsd_dispatch calls 7: sys_mmapcr_eolcr_splitcr_host_eq_cicr_wild_matchcr_tok_eq_ci+1 |