code wiki / (root) / nx_tls13_hello_test.nx

nx_tls13_hello_test.nx

buildroot/runtime/nx_tls13_hello_test.nx

8734 B204 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic tls13
docsdependenciesstructsconstsfunctions

about

nx_tls13_hello_test.nx -- structural + iterator KAT for the ClientHello emitter + ServerHello parser + extensions iterator. We don't pin to RFC 8448 ยง3 ClientHello bytes because that vector uses a specific extension ordering + a different cipher-suite list + includes extensions we don't yet ship (padding, psk_kex_modes). Instead we verify: A. Emit succeeds + total length matches spec formula B. Handshake header is well-formed: msg_type=1, uint24 length equals total - 4 C. Body fields land at the expected offsets: legacy_version, random (round-trip), session_id (empty), cipher_suites (3 TLS 1.3 standard suites in canonical order), compression D. Extensions list length matches actual sum of emitted extensions E. Iterator finds each of the 5 extensions by type F. server_name extension contents includes our SNI hostname G. key_share extension contents includes our pubkey H. Re-parse as ServerHello (similar structure -- cipher_suite is single not list, so we use a hand-built mini-ServerHello) verifies the parser's structural walk works expect_exit: 0 license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_tls13.nx nx_tls13_ext.nx nx_tls13_hello.nx nx_tls13_hello_test.nx

imports: nx_syscalls.nxnx_tls13.nxnx_tls13_ext.nxnx_tls13_hello.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap tls13_client_hello_emit tls13_client_hello_emit2 tls_write_u16_be tls13_ext_emit_supported_v tls_write_u16_be ↻ tls13_ext_emit_supported_g tls_write_u16_be ↻ tls13_ext_emit_signature_a tls_write_u16_be ↻ tls13_ext_emit_key_share_x tls_write_u16_be ↻ tls13_ext_emit_key_share_d tls_write_u16_be ↻ tls13_ext_emit_key_share_p tls_write_u16_be ↻ tls13_ext_emit_server_name tls_write_u16_be ↻ tls13_ext_emit_alpn_http11 tls_write_u16_be ↻ tls_write_u24_be tls_read_u16_be tls13_ext_find tls_read_u16_be ↻ tls13_server_hello_parse tls_read_u16_be ↻ nx_tls13_hello_verdict_is_

structs

none

consts

none

functions

31func main() -> i64