code wiki / (root) / nx_session_mint_lib.nx

nx_session_mint_lib.nx

buildroot/runtime/nx_session_mint_lib.nx

3911 B68 linesdepth 10pulls 17 transitivereach 3 importersview sourcekind librarytopic session
docsdependenciesstructsconstsfunctions

about

nx_session_mint_lib.nx -- LIBRARY (no main): mint an M5 no-cookie session token directly from a server key bundle, without the OPAQUE passphrase. Shared by the CLI (nx_mgmt_session_mint) and the mgmt driver (nx_mgmt_call). See nx_mgmt_session_mint.nx header for the full rationale + token/keyfile layout. Operator-authorized 2026-07-08.

dependencies 1 imports · 3 importers

nx_no_cookie_session.nx nx_session_mint_lib.nx nx_mgmt_call.nx nx_mgmt_session_mint.nx nx_mgmt_session_mint_gate.nx

imports: nx_no_cookie_session.nx

imported by: nx_mgmt_call.nxnx_mgmt_session_mint.nxnx_mgmt_session_mint_gate.nx

structs

none

consts

none

functions

6func msm_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
called by 2: mainmain
7func msm_atoi(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c >= 0x30 { if c <= 0x39 { v = v * 10 + (c - 0x30) } } i = i + 1 } return v }
called by 1: main
8func msm_hexval(c: i64) -> i64 { if c >= 0x30 { if c <= 0x39 { return c - 0x30 } } if c >= 0x61 { if c <= 0x66 { return c - 0x61 + 10 } } if c >= 0x41 { if c <= 0x46 { return c - 0x41 + 10 } } return 0 }
called by 1: msm_load_edpriv
11func msm_b64_enc(inb: *u8, n: i64, out: *u8) -> i64
called by 1: msm_mint_b64
32func msm_load_edpriv(keysfile: *u8, out32: *u8) -> i64
49func msm_mint_raw(keysfile: *u8, realm: *u8, realm_n: i64, handle: *u8, handle_n: i64, now_s: i64, ttl_s: i64, out_tok: *u8) -> i64
61func msm_mint_b64(keysfile: *u8, realm: *u8, realm_n: i64, handle: *u8, handle_n: i64, now_s: i64, ttl_s: i64, out_b64: *u8) -> i64
called by 2: mainmain calls 2: msm_mint_rawmsm_b64_enc