code wiki / _hdl_build / nx_cert_loader_gate.nx
nx_cert_loader_gate.nx
buildroot/runtime/_hdl_build/nx_cert_loader_gate.nx
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
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
structs
| none |
consts
| 18 | const 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
| 6 | func 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 } |
| 7 | func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 8 | func 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 } |
| 9 | func 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 } |
| 11 | func g_bytes_eq(ptr: i64, len: i64, exp: *u8) -> i64 |
| 20 | func g_chain(sni: *u8, want: *u8) -> i64 |
| 29 | func main() -> i64 |