nx_x509_chain_cache_gate.nx
buildroot/runtime/nx_x509_chain_cache_gate.nx
about
nx_x509_chain_cache_gate.nx -- durable regression witness for the cert-validation MEMOIZATION cache
(nx_x509_chain_verify: _cv_der_len + _cv_key_eq). The cache memoizes the PURE verify on
sha256(child_der||parent_der); a bug in _cv_der_len (wrong cert length -> key over wrong bytes) would risk a
false cache hit, and a bug in _cv_key_eq (loose 32-byte compare) would risk a cross-cert hit -- so both are
KAT-locked here. The live badssl gate (self-signed/expired/wrong-host rejected) covers end-to-end; this locks
the correctness-critical helpers so a future edit can't silently regress them. license_tier: ORIGINAL expect_exit:0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_x509_chain_verify.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 gcw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 11 | func gpn(v: i64) -> i64 { var m: i64=v; if m==0 { gcw("0" as *u8); return 0 } let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8=sys_mmap(24); var i: i64=0; while i<k { o[i]=t[k-1-i]; i=i+1 } sys_write(1,o,k); return 0 } |
| 12 | func chk(name: *u8, got: i64, want: i64, f: *i64) -> i64 |
| 17 | func main() -> i64 |