code wiki / (root) / nx_tls13_cert_cache_gate.nx

nx_tls13_cert_cache_gate.nx

buildroot/runtime/nx_tls13_cert_cache_gate.nx

5555 B96 linesdepth 16pulls 77 transitivereach 0 importersview sourcekind gate/prooftopic tls13
docsdependenciesstructsconstsfunctions

about

nx_tls13_cert_cache_gate.nx -- proves the additive cert-validation CACHE in nx_tls13_client_validate_certificate: a byte-identical cached cert short-circuits to OK (skipping the ECDSA chain crypto), ANY mismatch / no-cache runs full validation, and the presented cert is captured to cert_out (bounded, no overflow). The test cert is DELIBERATELY INVALID -- so a cache-hit returning OK conclusively proves the pipeline was skipped, and a cache-miss returning non-OK proves it was NOT. GREEN + exit 0 iff all pass. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_tls13_client_validate_certifica nx_syscalls.nx nx_gate_verdict.nx nx_tls13_cert_cache_gate.nx

imports: nx_tls13_client_validate_certificate.nxnx_syscalls.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main cg_puts sys_write sys_mmap nx_tls13_client_validate_c nx_tls13_cv_memeq nx_https_cert_pipeline_ver sys_mmap ↻ tls13_parse_certificate_ch tls13_auth_check_handshake tls_read_u16_be 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 ↻ x509_read_alg_id sys_mmap ↻ asn1_expect_tag ↻ trust_store_lookup_by_subj nx_x509_dn_match _pipeline_verify_n sys_mmap ↻ tls13_parse_certificate_ch ↻ x509_parse ↻ x509_leaf_check sys_mmap ↻ x509_parse ↻ x509_validity_check sys_mmap ↻ x509_validity_get x509_san_match_hostname sys_mmap ↻

structs

none

consts

none

functions

10func cg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: cg_rowmain calls 1: sys_write
11func cg_putn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
20func cg_memeq(a: *u8, an: i64, b: *u8, bn: i64) -> i64
called by 1: main
26func cg_row(name: *u8, ok: i64) -> i64
called by 1: main calls 1: cg_puts
32func main() -> i64