nx_tls12_hello_test.nx
buildroot/runtime/nx_tls12_hello_test.nx
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
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
structs
| none |
consts
| none |
functions
| 10 | func tg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 11 | func tg_p(s: *u8) -> i64 { sys_write(1, s, tg_slen(s)); return 0 } |
| 12 | func tg_row(name: *u8, pass: i64) -> i64 |
| 17 | func tg_contains(buf: *u8, n: i64, needle: *u8) -> i64 |
| 31 | func main() -> i64 |