nx_acquire_license_lib.nx
buildroot/runtime/nx_acquire_license_lib.nx
about
nx_acquire_license_lib.nx -- the LICENCE-URL DERIVATION as a LIBRARY.
WHY A LIB, and it is the same unblock nx_licgate_lib records: an organ with main() CANNOT be
imported (double-main), so a gate over a CLI can only fork the deployed binary. That fork is a
boundary the mutation harness is blind across -- every mutant comes back NOT-REACHED and the gate
returns a clean GREEN that reads exactly like a proof while proving nothing. Splitting the pure
core out is what makes the logic mutation-testable at all.
FAIL-CLOSED ON AN UNKNOWN HOST. Guessing a licence location for a host whose layout we have not
established would fetch some other file and pin its digest as though it were a licence: a
fabricated fact wearing a cryptographic pin, which is worse than no licence at all. Unknown -> -1.
DERIVING A URL IS NOT EVIDENCE. This produces CANDIDATES. A row reaches evidence=READ only once
those bytes are fetched, stored and pinned.
license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_acquire_license.nxnx_acquire_license_gate.nx
structs
| none |
consts
| 18 | const AL_URLCAP: i64 = 512 |
| 19 | const AL_SLASH: i64 = 47 |
| 20 | const AL_NUL: i64 = 0 |
| 21 | const AL_CAND_N: i64 = 4 |
| 23 | const AL_HOST_UNKNOWN: i64 = 0 |
| 24 | const AL_HOST_GITHUB: i64 = 1 |
| 25 | const AL_HOST_HF: i64 = 2 |
| 26 | const AL_HOST_HF_DATASET: i64 = 3 |
functions
| 28 | func al_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: alc_puts |
| 30 | func al_cat(d: *u8, o: i64, s: *u8) -> i64 called by 1: al_host |
| 37 | func al_starts(s: *u8, p: *u8) -> i64 called by 1: al_host |
| 48 | func al_streq(a: *u8, b: *u8) -> i64 |
| 61 | func al_cand(i: i64) -> *u8 |
| 71 | func al_host(url: *u8) -> i64 |
| 81 | func al_seg(url: *u8, skip: i64, want: i64, out: *u8, cap: i64) -> i64 |
| 111 | func aq_license_url(url: *u8, cand: i64, out: *u8, cap: i64) -> i64 |
| 148 | func al_host_name(h: i64) -> *u8 |