code wiki / (root) / nx_tls12_hello_test.nx

nx_tls12_hello_test.nx

buildroot/runtime/nx_tls12_hello_test.nx

3328 B80 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic tls12
docsdependenciesstructsconstsfunctions

about

nx_tls12_hello_test.nx -- KAT for the TLS 1.2 ClientHello emitter (rung 1, no network). Emits a CH for SNI "example.com" with a fixed random and asserts the wire structure byte-for-byte: out[0]=1 (ClientHello) ; out[4..5]=0x0303 (TLS 1.2) ; out[38]=0 (empty session_id) ; out[39..40]=0x0008 (cipher_suites list len) ; out[41..42]=0xC02B (first suite) ; handshake length field (out[1..3]) == ret-4 ; SNI host bytes present. VIZSLA-style gate: prints ROW/PASS, exit 0 iff all rows pass. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_tls12_hello.nx nx_tls12_hello_test.nx

imports: nx_syscalls.nxnx_tls12_hello.nx

imported by: nobody (leaf or entry point)

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

main tg_p sys_write tg_slen sys_mmap tls12_client_hello_emit tls13_ext_emit_server_name tls_write_u16_be tls12_ext_emit_supported_g tls12_ext_emit_ec_point_fo tls13_ext_emit_signature_a tls_write_u16_be ↻ tg_row tg_p ↻ tg_contains tg_slen ↻ sys_write ↻

structs

none

consts

none

functions

10func tg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: tg_ptg_contains
11func tg_p(s: *u8) -> i64 { sys_write(1, s, tg_slen(s)); return 0 }
called by 2: tg_rowmain calls 2: sys_writetg_slen
12func tg_row(name: *u8, pass: i64) -> i64
called by 1: main calls 1: tg_p
17func tg_contains(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: tg_slen
31func main() -> i64