code wiki / _hdl_build / nx_cert_carrier.nx

nx_cert_carrier.nx

buildroot/runtime/_hdl_build/nx_cert_carrier.nx

6428 B121 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic cert
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_cert_carrier.nx nx_cert_carrier_gate.nx

imports: nx_syscalls.nx

imported by: nx_cert_carrier_gate.nx

structs

none

consts

none

functions

10func cc_lc(b: i64) -> i64 { if b >= 65 { if b <= 90 { return b + 32 } } return b }
called by 1: cc_ci_at
13func cc_ci_at(req: *u8, i: i64, n: i64, name_lc: *u8) -> i64
23func cc_line_end(req: *u8, start: i64, n: i64) -> i64
32func 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 }
called by 2: cc_accept_uidmain
36func cc_header_value(req: *u8, req_n: i64, name_lc: *u8, out: *u8, cap: i64) -> i64
called by 1: cc_accept_uid calls 2: cc_line_endcc_ci_at
67func cc_cpy(dst: *u8, o: i64, src: *u8) -> i64
called by 1: cc_inject_secret
75func cc_inject_secret(req: *u8, req_n: i64, secret: *u8, secret_n: i64, out: *u8, out_cap: i64) -> i64
called by 1: main calls 3: cc_line_endcc_cpycc_ci_at
115func cc_accept_uid(req: *u8, req_n: i64, secret: *u8, secret_n: i64, out_uid: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_mmapcc_header_valuecc_eq