code wiki / _hdl_build / nx_wpt_fetch.nx

nx_wpt_fetch.nx

buildroot/runtime/_hdl_build/nx_wpt_fetch.nx

9970 B126 linesdepth 21pulls 128 transitivereach 0 importersview sourcekind tooltopic wpt
docsdependenciesstructsconstsfunctions

about

nx_wpt_fetch.nx -- SOVEREIGN one-time retrieval of a small REAL Web-Platform-Tests reftest subset, for the external-oracle validation spine (the WPT files are a 3rd-party ORACLE, never on the program path). Fetches each pinned raw.githubusercontent.com URL over our OWN DNS+TLS1.3(vs Mozilla CAs)+HTTP stack (no curl/git/wget) -> vendors verbatim under knowledge/wpt/ + writes PROVENANCE.txt (the exact commit SHA + source URLs) so the pass-% nx_wpt_run reports is falsifiable + reproducible. license_tier: ORACLE-VENDOR

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_get.nx nx_http_response_parse.nx nx_wpt_fetch.nx

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_get.nxnx_http_response_parse.nx

imported by: nobody (leaf or entry point)

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

main _p sys_write 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 ↻ x509_read_alg_id

structs

none

consts

11const K_MAGIC_8388608: i64 = 8388608
12const K_MAGIC_4194304: i64 = 4194304

functions

14func _p(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: fetch_onemain calls 1: sys_write
15func _n(v0: i64) -> i64 { var v: i64=v0; if v<0 { let m: *u8=sys_mmap(8); m[0]=45 as u8; sys_write(1,m,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0 {b[0]=48;k=1} while v>0 {b[k]=(48+(v%10)) as u8; v=v/10; k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k {o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 }
called by 2: fetch_onemain calls 2: sys_mmapsys_write
19func wf_fetch(url: *u8, store: *TrustStore, cr: *u8, priv: *u8, lenbox: *i64) -> *u8
46func wf_write(path: *u8, buf: *u8, len: i64) -> i64
53func _ws(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
56func fetch_one(url: *u8, path: *u8, store: *TrustStore, cr: *u8, priv: *u8) -> i64
called by 1: main calls 5: sys_mmapwf_fetch_pwf_write_n
66func main() -> i64