code wiki / _hdl_build / nx_email_submit_gate.nx

nx_email_submit_gate.nx

buildroot/runtime/_hdl_build/nx_email_submit_gate.nx

7247 B148 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic email
docsdependenciesstructsconstsfunctions

about

nx_email_submit_gate.nx -- GATE for EMAIL R6 (submission, nx_email_submit). COMPLETENESS : AUTH PLAIN encodes "\0user\0pass" (verified by base64- decoding the produced token); AUTH LOGIN token decodes to the username; STARTTLS capability detected; the submission FSM walks 220->EHLO->STARTTLS->TLS_UPGRADE-> EHLO2->AUTH->READY; ports 465/587 selected. NEG-CONTROL : an EHLO reply without STARTTLS -> not advertised (0). TAMPER/SEC : if STARTTLS is NOT offered the FSM ABORTS at EHLO -- credentials are never sent in cleartext (downgrade defense); a 535 at AUTH -> ABORT/FAIL. Evidence -> knowledge/status/email_submit.log (SUBMITGATE authored=organ ... verdict=GREEN) license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_email_submit.nx nx_base64.nx nx_syscalls.nx nx_gate_verdict.nx nx_email_submit_gate.nx

imports: nx_email_submit.nxnx_base64.nxnx_syscalls.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ nx_submit_auth_plain sub_cat b64_encode b64_enc_char b64_decode b64_grab b64_dec_char memeq nx_submit_auth_login_token b64_encode ↻ nx_submit_starttls_avail slen nx_submit_port nx_submit_advance sub_is2xx ew sys_write ↻ epf ew ↻ sys_openat_append sys_close gv_ctr sys_mmap ↻ gv_verdict

structs

none

consts

21const SUB_LOG: *u8 = "knowledge/status/email_submit.log"

functions

23func ew(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 2: epfmain calls 1: sys_write
24func ewn(fd: i64, v: i64) -> i64
33func epf(fd: i64, label: *u8, pass: i64) -> i64 { ew(fd, label); if pass == 1 { ew(fd, "PASS" as *u8) } else { ew(fd, "FAIL" as *u8) } return 0 }
called by 1: main calls 1: ew
34func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
35func memeq(a: *u8, b: *u8, len: i64) -> i64 { var i: i64 = 0; while i < len { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
37func main() -> i64