code wiki / (root) / nx_tls13_ch_compat_test.nx

nx_tls13_ch_compat_test.nx

buildroot/runtime/nx_tls13_ch_compat_test.nx

18930 B399 linesdepth 18pulls 117 transitivereach 0 importersview sourcekind gate/prooftopic tls13
docsdependenciesstructsconstsfunctions

about

nx_tls13_ch_compat_test.nx -- B2-HTTPBIN-CH gate row (browser arc). The B2 defect was "httpbin.org answers our ClientHello with an alert". ROOT CAUSE (oracle-measured 2026-06-10, openssl census): httpbin.org does NOT speak TLS 1.3 at all (-tls1_3 -> no cipher; -tls1_2 -> ECDHE-RSA-AES128-GCM-SHA256, P-256 temp key). Its ELB answers a 1.3-only CH with warning close_notify (AL=1 AD=0). Our CH was never malformed -- the CH-compat suspicion is REFUTED. TLS 1.2 client support = separate named rung (not B2's bar). So this row proves the CH-compat claim with two live legs: LEG A (httpbin census, live-updating): send the PRODUCT dual- share CH to httpbin.org and classify the response: - warning/any close_notify (AD=0) or protocol_version (AD=70) alert, or a TLS 1.2 ServerHello (no supported_versions ext) -> the measured TLS-1.2-only signature -> leg PASS - a TLS 1.3 ServerHello -> httpbin enabled 1.3: the leg now DEMANDS the full handshake to WAIT_CLIENT_FIN - any other alert (decode_error 50, illegal_parameter 47, handshake_failure 40) -> a REAL CH problem -> leg FAIL LEG B (P-256 live proof): secp256r1-ONLY CH to github.com (census: completes TLS 1.3 + P-256 + TLS_AES_128_GCM_SHA256). Server MUST take our P-256 share (GR=23 asserted) and the FULL encrypted handshake walks to WAIT_CLIENT_FIN -- the live E2E proof of rung B4's path against an independent implementation, which dual-share connects can never exercise (servers prefer x25519 when offered). Exit 0 iff BOTH legs pass. Markers: L1=/L2= leg verdicts, AL=/AD= alert level/desc, CS=/GR= server cipher + group pick, RC=/CT=/DV=/MT=/DW=/ST= per-record walk (B1 probe pattern). Prereq: /tmp/mozilla_certdata.txt staged (gate self-stages). expect_exit: 0 license_tier: ORIGINAL

dependencies 9 imports · 0 importers

nx_syscalls.nx nx_https_url_for_fetch.nx nx_https_url_connect.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_cert_pipeline.nx nx_tls13_client_session_recv_sh.nx nx_tls13_client_session_recv_hs.nx nx_tls13_read_record_from_fd.nx nx_tls13_ch_compat_test.nx

imports: nx_syscalls.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_cert_pipeline.nxnx_tls13_client_session_recv_sh.nxnx_tls13_client_session_recv_hs.nxnx_tls13_read_record_from_fd.nx

imported by: nobody (leaf or entry point)

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

main sys_now_realtime_sec sys_mmap sys_clock_gettime_real nx_trust_store_load_from_c sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻ _is_space _decode_octal_escape _is_octal trust_store_alloc sys_mmap ↻ nx_x509_trust_store_load sys_mmap ↻ x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_tag asn1_read_length asn1_read_length ↻ x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻

structs

none

consts

none

functions

49func cc_dec(label0: i64, label1: i64, v: i64) -> i64
77func cc_sh_group_census(sh_body: *u8, sh_len: i64) -> i64
102func cc_sh_is_tls13(sh_body: *u8, sh_len: i64) -> i64
122func cc_connect(url: *u8, host_len: i64, out_host: *i64) -> i64
146func cc_send_ch(fd: i64, ch_buf: *u8, ch_n: i64) -> i64
167func cc_walk(s: *Tls13ClientSession, fd: i64, val_ctx: *TlsValidationContext) -> i64
257func cc_leg_httpbin(store: *TrustStore, epoch: i64) -> i64
325func cc_leg_p256(store: *TrustStore, epoch: i64) -> i64
384func main() -> i64