nx_login_e2e_probe.nx
buildroot/runtime/nx_login_e2e_probe.nx
about
nx_login_e2e_probe.nx -- SOVEREIGN end-to-end auth proof (operator: "prove it, no bullshit loop"). Our
nx_https_fetch_follow is GET-only; this adds the missing rung: a TLS-1.3 client that POSTs (register/login)
and sets X-Nishi-Session (validate at the gated /wiki). It PROVES the wiki-gateway key+realm fix: a token
minted by :9091 must validate at :18791 and return GATED CONTENT, not the login/bootstrap. Flow against the
LIVE site: POST /register (throwaway handle) -> POST /login -> token -> GET /wiki/creation WITH the token.
Reuses the proven connect+handshake (nx_https_url_*, nx_tls13_client_session_run) + the record encrypt/read
path lifted from nx_https_get_complete (only the request is pre-built instead of a baked GET). A CLIENT that
runs+exits (dev-spoke querying the hub) -- NOT a daemon. license_tier: ORIGINAL expect_exit: 0
dependencies 14 imports · 0 importers
diagram shows first 10 each side; +4 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_http_response_parse.nxnx_tls13.nxnx_tls13_record.nxnx_tls13_read_record_from_fd.nxnx_tls13_client_session.nxnx_chacha20_poly1305.nxnx_u256.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
| 23 | const K_MAGIC_16645: i64 = 16645 |
| 24 | const K_MAGIC_4194304: i64 = 4194304 |
| 25 | const K_MAGIC_8192: i64 = 8192 |
| 26 | const K_MAGIC_262144: i64 = 262144 |
| 27 | const K_MAGIC_1024: i64 = 1024 |
| 29 | const HOST: *u8 = "nishifamily.com" |
| 30 | const HOSTLEN: i64 = 15 |
functions
| 32 | func ep(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 33 | func epn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var x: i64=v; if x<0 {b[0]=45;sys_write(1,b,1);x=0-x}; if x==0 {b[0]=48;sys_write(1,b,1);return 0} var d: i64=0; var y: i64=x; while y>0 {d=d+1;y=y/10} var i: i64=d-1; y=x; while i>=0 {b[i]=(48+(y%10)) as u8; y=y/10; i=i-1} sys_write(1,b,d); return 0 } |
| 34 | func ecat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){dst[o]=s[i]; o=o+1; i=i+1} return o } called by 1: e2e_req |
| 35 | func eslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 36 | func econtains(buf: *u8, n: i64, needle: *u8) -> i64 called by 1: main |
| 45 | func ewrite_n(fd: i64, buf: *u8, n: i64) -> i64 { var off: i64=0; while off<n { let w: i64=sys_write(fd, ((buf as i64)+off) as *u8, n-off); if w<=0 { return 0-1 } off=off+w } return 0 } |
| 49 | func e2e_send(s: *Tls13ClientSession, fd: i64, req: *u8, req_len: i64, out: *u8, out_cap: i64) -> i64 |
| 87 | func e2e_req(store: *TrustStore, req: *u8, req_len: i64, out: *u8, out_cap: i64) -> i64 |
| 116 | func build_post(path: *u8, body: *u8, out: *u8) -> i64 |
| 127 | func build_get_auth(path: *u8, tok: *u8, out: *u8) -> i64 |
| 135 | func extract_token(buf: *u8, n: i64, out: *u8) -> i64 |
| 145 | func main() -> i64 |