code wiki / _hdl_build / nx_opaque_login_smoke.nx

nx_opaque_login_smoke.nx

buildroot/runtime/_hdl_build/nx_opaque_login_smoke.nx

6121 B108 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind smoketopic opaque
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_connect.nx nx_assert.nx nx_opaque_login_smoke.nx

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

main smk_trunc sys_openat_wr sys_close sys_fork sys_mmap sys_execve sys_exit sys_sleep_ms sys_mmap ↻ sys_munmap smk_post smk_slen sys_mmap ↻ smk_http sys_socket sys_set_socket_timeout sys_mmap ↻ sys_setsockopt sys_munmap ↻ sys_mmap ↻ nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close ↻ sys_write sys_read nx_puts_err sys_write ↻ nx_puti_err sys_mmap ↻ sys_write ↻ smk_find nx_kill sys_wait4

structs

none

consts

8const SMK_MAGIC_32768: i64 = 32768
9const SMK_MAGIC_2048: i64 = 2048
10const SMK_MAGIC_32767: i64 = 32767
12const SMK_PORT: i64 = 18099
13const DAEMON_ELF: *u8 = "/tmp/nx_opaque_login_daemon.sov.elf" as *u8

functions

15func 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
16func smk_find(buf: *u8, n: i64, needle: *u8, nl: i64) -> i64
called by 1: main
22func smk_trunc(path: *u8) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd>=0 { sys_close(fd) } return 0 }
called by 1: main calls 2: sys_openat_wrsys_close
25func smk_http(req: *u8, reqn: i64, resp: *u8, cap: i64) -> i64
39func smk_post(reqbuf: *u8, path: *u8, body: *u8) -> i64
called by 1: main calls 2: smk_slensys_mmap
51func main() -> i64