code wiki / _hdl_build / nx_cert_carrier.nx
nx_cert_carrier.nx
buildroot/runtime/_hdl_build/nx_cert_carrier.nx
about
nx_cert_carrier.nx -- the BACKEND trust side of the sovereign no-JS cert carrier (rung 3 of the hosting
platform / the login project). A request reaches the content backend (wiki_gw = nx_opaque_login_daemon) ONLY
via the trusted personal daemon, which strips any client-supplied copies (nx_aw_mtls_inject 10/10) and injects
the REAL X-Nishi-Cert-Identity (the uid) + X-Nishi-Proxy-Auth (a shared secret). cc_accept_uid trusts the
identity ONLY when X-Nishi-Proxy-Auth EXACTLY equals the secret -- so a LAN attacker hitting the backend port
directly with a forged X-Nishi-Cert-Identity (no secret) gets NOTHING, falls back to the X-Nishi-Session path.
Defensive at the boundary (rule 12). license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_cert_carrier_gate.nx
structs
| none |
consts
| none |
functions
| 10 | func cc_lc(b: i64) -> i64 { if b >= 65 { if b <= 90 { return b + 32 } } return b } called by 1: cc_ci_at |
| 13 | func cc_ci_at(req: *u8, i: i64, n: i64, name_lc: *u8) -> i64 |
| 23 | func cc_line_end(req: *u8, start: i64, n: i64) -> i64 |
| 32 | func cc_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64 { if an != bn { return 0 } var i: i64=0; while i<an { if a[i]!=b[i] { return 0 } i=i+1 } return 1 } |
| 36 | func cc_header_value(req: *u8, req_n: i64, name_lc: *u8, out: *u8, cap: i64) -> i64 |
| 67 | func cc_cpy(dst: *u8, o: i64, src: *u8) -> i64 called by 1: cc_inject_secret |
| 75 | func cc_inject_secret(req: *u8, req_n: i64, secret: *u8, secret_n: i64, out: *u8, out_cap: i64) -> i64 |
| 115 | func cc_accept_uid(req: *u8, req_n: i64, secret: *u8, secret_n: i64, out_uid: *u8, cap: i64) -> i64 |