code wiki / _hdl_build / nx_connect_pubkey_bind_gate.nx
nx_connect_pubkey_bind_gate.nx
buildroot/runtime/_hdl_build/nx_connect_pubkey_bind_gate.nx
about
nx_connect_pubkey_bind_gate.nx -- proves the CONNECT pubkey directory BINDS keys to an authenticated
identity, so trust-on-first-use is dead: once a handle is verified under an account, no other account
and no anonymous caller can substitute a different key for it. A relay operator or impostor therefore
cannot man-in-the-middle the key directory. Tests cs_sh_pub_put2 directly AND through the live
/connect/pubkey route (ctx[CS_UID] stamped exactly as the daemon does), plus a compaction round-trip
proving the owner+verified binding is DURABLE across a boot replay.
license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_connect_serve.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
| 10 | const PB_BUF: i64 = 262144 |
functions
| 12 | func pb_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 13 | func pb_n(v: i64) -> i64 { let t: *u8=sys_mmap(32); let o: i64=cu_putn(t,0,v); t[o]=0 as u8; pb_w(t); return 0 } |
| 14 | func pb_check(pass: i64, label: *u8, fails: *i64) -> i64 |
| 19 | func pb_has(buf: *u8, n: i64, needle: *u8) -> i64 |
| 32 | func pb_post(dst: *u8, path: *u8, body: *u8) -> i64 |
| 42 | func pb_get(dst: *u8, path: *u8) -> i64 |
| 49 | func pb_uid(buf: *u8, tag: i64) -> i64 { var i: i64=0; while i<32 { buf[i]=((tag+i) & 0xff) as u8; i=i+1 } return 32 } called by 1: main |
| 51 | func main() -> i64 |