code wiki / (root) / nx_aw_mtls_inject_gate.nx

nx_aw_mtls_inject_gate.nx

buildroot/runtime/nx_aw_mtls_inject_gate.nx

5978 B95 linesdepth 13pulls 24 transitivereach 0 importersview sourcekind gate/prooftopic aw
docsdependenciesstructsconstsfunctions

about

nx_aw_mtls_inject_gate.nx -- gate the sovereign mTLS carrier's identity-injection TRUST BOUNDARY. Proves the two security-floor invariants WITHOUT needing a Nishi mTLS client: the cert is only consulted when auth==1, but the X-Nishi-Cert-Identity STRIP runs for every auth -> a no-cert/bad-cert client can never smuggle a spoofed identity to the backend, and a clean request is forwarded byte-exact (never- lockout). The real-CN inject (auth==1 with a parseable cert) is covered downstream by run_ecdsa_mtls's loopback+interop gates feeding a real cert. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_aw_mtls_inject.nx nx_mtls_identity.nx nx_aw_mtls_inject_gate.nx

imports: nx_syscalls.nxnx_aw_mtls_inject.nxnx_mtls_identity.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main g_puts sys_write sys_mmap g_len mtls_inject_identity mi_line_end mi_copy sys_mmap ↻ nx_mtls_cert_identity sys_mmap ↻ x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_tag asn1_read_length asn1_read_length ↻ x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻ x509_read_alg_id sys_mmap ↻ asn1_expect_tag ↻ mi_ci_starts mi_lc g_check g_puts ↻ g_eq g_has_ci mi_ci_starts ↻ nx_mtls_mint_identity_cert nx_mtls_derive_identity_ke hkdf_expand sys_mmap ↻ hmac_sha256 sys_mmap ↻ sha256_digest

structs

none

consts

none

functions

11func g_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: g_checkmain calls 1: sys_write
12func g_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
15func g_has_ci(buf: *u8, n: i64, lit: *u8) -> i64
called by 1: main calls 1: mi_ci_starts
20func g_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64
called by 1: main
26func g_check(name: *u8, cond: i64) -> i64
called by 1: main calls 1: g_puts
31func main() -> i64