code wiki / _hdl_build / nx_cert_loader_gate.nx

nx_cert_loader_gate.nx

buildroot/runtime/_hdl_build/nx_cert_loader_gate.nx

3943 B61 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic cert
docsdependenciesstructsconstsfunctions

about

nx_cert_loader_gate.nx -- gate for the cert data-loader. Writes fixture chain/key files, then asserts cl_load resolves a SNI host (via cr_match) and returns the ACTUAL chain+key bytes -- with anti-spoof carried through and a missing file -> 0 (fail-safe, the daemon uses its default). GREEN iff T1..T5. Sovereign: nx_cert_loader. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_cert_loader.nx nx_cert_loader_gate.nx

imports: nx_cert_loader.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main g_w g_writef sys_openat_wr g_len g_row g_w ↻ g_chain g_len ↻ cl_load cr_match sys_mmap cr_eol cr_split cr_is_sep cr_host_eq_ci cr_lc cr_wild_match cr_lc ↻ cr_tok_eq_ci cr_slen cr_lc ↻ cr_copyz sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close g_bytes_eq g_len ↻ g_len ↻ cl_load ↻ sys_openat_append

structs

none

consts

18const CL_REG: *u8 = "*.nishifamily.com /tmp/cl_nf.der /tmp/cl_nf.key\n*.andelinwest.com /tmp/cl_aw.der /tmp/cl_aw.key\nbrokensite.com /tmp/cl_missing.der /tmp/cl_missing.key\n* /tmp/cl_def.der /tmp/cl_def.key\n" as *u8

functions

6func g_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: g_rowmain
7func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
8func g_row(name: *u8, ok: i64) -> i64 { if ok == 1 { g_w(" PASS " as *u8) } else { g_w(" FAIL " as *u8) } g_w(name); g_w("\n" as *u8); return ok }
called by 1: main calls 1: g_w
9func g_writef(path: *u8, s: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x180); if fd < 0 { return 0-1 } sys_write(fd, s, g_len(s)); sys_close(fd); return 0 }
called by 1: main calls 2: sys_openat_wrg_len
11func g_bytes_eq(ptr: i64, len: i64, exp: *u8) -> i64
called by 1: g_chain calls 1: g_len
20func g_chain(sni: *u8, want: *u8) -> i64
called by 1: main calls 3: g_lencl_loadg_bytes_eq
29func main() -> i64