code wiki / (root) / nx_tls12_hello.nx

nx_tls12_hello.nx

buildroot/runtime/nx_tls12_hello.nx

4671 B93 linesdepth 3pulls 4 transitivereach 356 importersview sourcekind librarytopic tls12
docsdependenciesstructsconstsfunctions

about

nx_tls12_hello.nx -- TLS 1.2 ClientHello emitter (rung 1 of the sovereign TLS 1.2 client). ROOT CAUSE (probed 2026-06-23, news.ycombinator.com): some endpoints are TLS 1.2-ONLY and reject our 1.3-only ClientHello with a fatal protocol_version(70) alert; after we offered 1.2 they want a 1.2 cipher we didn't send. This module emits a real 1.2 ClientHello so we can negotiate 1.2 with those servers -- the "access everywhere" unlock (the crypto primitives + nx_tls12_prf already exist; this wires the protocol). Offered cipher suites = the ones we can actually COMPLETE (AEAD + SHA256 PRF = nx_tls12_prf_sha256): 0xC02B ECDHE-ECDSA-AES128-GCM-SHA256 0xC02F ECDHE-RSA-AES128-GCM-SHA256 0xCCA9 ECDHE-ECDSA-CHACHA20-POLY1305-SHA256 0xCCA8 ECDHE-RSA-CHACHA20-POLY1305-SHA256 (AES-256-GCM-SHA384 omitted: needs the P_SHA384 PRF/key-schedule, a later rung.) Extensions reuse the version-agnostic emitters from nx_tls13_ext.nx (server_name, supported_groups, signature_algorithms) + a 1.2-needed ec_point_formats. license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_syscalls.nx nx_tls13_ext.nx nx_tls12_hello.nx nx_tls12_client_session.nx nx_tls12_hello_test.nx nx_tls12_probe_test.nx

imports: nx_syscalls.nxnx_tls13_ext.nx

imported by: nx_tls12_client_session.nxnx_tls12_hello_test.nxnx_tls12_probe_test.nx

structs

none

consts

none

functions

24func tls12_ext_emit_supported_groups_p256(out: *u8, out_cap: i64) -> i64
33func tls12_ext_emit_ec_point_formats(out: *u8, out_cap: i64) -> i64
44func tls12_client_hello_emit(random32: *u8, sni: *u8, sni_len: i64, out: *u8, out_cap: i64) -> i64