code wiki / (root) / nx_sni_extract_gate.nx

nx_sni_extract_gate.nx

buildroot/runtime/nx_sni_extract_gate.nx

3489 B61 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic sni
docsdependenciesstructsconstsfunctions

about

nx_sni_extract_gate.nx -- gate the SNI router's hostname extraction. Builds REAL ClientHello records via the proven tls13_ext_emit_server_name and proves sni_extract_hostname recovers the host, plus trust-boundary negatives (truncated, non-handshake). license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_sni_extract.nx nx_tls13_ext.nx nx_sni_extract_gate.nx

imports: nx_syscalls.nxnx_sni_extract.nxnx_tls13_ext.nx

imported by: nobody (leaf or entry point)

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

main g_puts sys_write sys_mmap build_ch sys_mmap ↻ tls13_ext_emit_server_name tls_write_u16_be sni_extract_hostname sni_u16 g_check g_puts ↻ g_eq sys_exit

structs

none

consts

none

functions

8func g_puts(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_checkmain calls 1: sys_write
9func g_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64 { if an != bn { return 0 } var i: i64=0; while i<an { if a[i]!=b[i] { return 0 } i=i+1 } return 1 }
called by 1: main
10func g_check(name: *u8, cond: i64) -> i64 { if cond==1 { g_puts(" ok " as *u8); g_puts(name); g_puts("\n" as *u8); return 0 } g_puts(" FAIL " as *u8); g_puts(name); g_puts("\n" as *u8); return 1 }
called by 1: main calls 1: g_puts
13func build_ch(host: *u8, host_len: i64, out: *u8) -> i64
32func main() -> i64