code wiki / _hdl_build / nx_opaque_login_smoke.nx
nx_opaque_login_smoke.nx
buildroot/runtime/_hdl_build/nx_opaque_login_smoke.nx
about
nx_opaque_login_smoke.nx -- R2 smoke: fork the OPAQUE login daemon, drive it as a REAL HTTP client over a
socket (POST /register -> POST /login -> GET /whoami[valid] -> GET /whoami[bad token]), proving the
no-cookie OPAQUE login works end-to-end over the wire. Requires /tmp/nx_opaque_login_daemon.sov.elf built
in the same WSL session (the WOMB emits there). exit 0 = pass, N = assertion N failed.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_connect.nxnx_assert.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
| 8 | const SMK_MAGIC_32768: i64 = 32768 |
| 9 | const SMK_MAGIC_2048: i64 = 2048 |
| 10 | const SMK_MAGIC_32767: i64 = 32767 |
| 12 | const SMK_PORT: i64 = 18099 |
| 13 | const DAEMON_ELF: *u8 = "/tmp/nx_opaque_login_daemon.sov.elf" as *u8 |
functions
| 15 | func smk_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: smk_post |
| 16 | func smk_find(buf: *u8, n: i64, needle: *u8, nl: i64) -> i64 called by 1: main |
| 22 | func smk_trunc(path: *u8) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd>=0 { sys_close(fd) } return 0 } |
| 25 | func smk_http(req: *u8, reqn: i64, resp: *u8, cap: i64) -> i64 called by 1: main calls 7: sys_socketsys_set_socket_timeoutsys_mmapnx_connect_boundedsys_closesys_write+1 |
| 39 | func smk_post(reqbuf: *u8, path: *u8, body: *u8) -> i64 |
| 51 | func main() -> i64 |