nx_https_post_complete.nx
buildroot/runtime/nx_https_post_complete.nx
about
nx_https_post_complete.nx -- HTTPS POST companion to
nx_https_get_complete. Sends an HTTP/1.1 POST request with a
caller-supplied body (typically application/jose+json for ACME)
over a CONNECTED TLS 1.3 session, then drains the encrypted
response into out_buf.
Composes:
nx_http_client_build_request_post -- POST line + headers + body
nx_tls13_record_encrypt_v2 -- AEAD wrap (one request rec)
nx_tls13_read_record_from_fd -- partial-read framer
nx_tls13_record_decrypt_v2 -- AEAD unwrap per response rec
Body size limit: NX_HTTPS_PC_BODY_BYTES (8 KB). ACME requests are
typically <2 KB (JWS-wrapped JSON over a 32-byte EdDSA key) so 8 KB
gives a comfortable margin. Caller should fragment larger payloads
across multiple TLS records explicitly (not auto-fragment here --
callers needing >8 KB request bodies are sufficiently rare that
they should opt in).
Verdict mirrors NX_HTTPS_GC_* with a PC prefix; same sealed-enum
shape (positive bytes on success, negative -verdict on failure).
Per Cardinals 9 (single-responsibility -- ONE round trip), 22
(composition of shipped primitives), 25 (build intelligence, don't
strip features -- adds POST capability without weakening GET).
license_tier: INDEPENDENT_REDERIVE
genealogy_id: international-research-sources/ietf/rfc_8446 + rfc_9112 + rfc_8555
lineage_id: nishi_https_post_complete_q1
dependencies 6 imports · 9 importers
imports: nx_syscalls.nxnx_tls13.nxnx_tls13_record.nxnx_tls13_read_record_from_fd.nxnx_tls13_client_session.nxnx_http_client.nx
imported by: nx_acme_http.nxnx_connect_live_verify.nxnx_crew_live_verify.nxnx_edge_probe.nxnx_funcheck.nxnx_https_post_complete_test.nxnx_office_live_verify.nxnx_porkbun_ping_probe.nxnx_survey_live_verify.nx
structs
| none |
consts
| 38 | const NX_HTTPS_PC_OK: i64 = 1 |
| 39 | const NX_HTTPS_PC_BAD_STATE: i64 = 2 |
| 40 | const NX_HTTPS_PC_BUILD_FAIL: i64 = 3 |
| 41 | const NX_HTTPS_PC_ENCRYPT_FAIL: i64 = 4 |
| 42 | const NX_HTTPS_PC_WRITE_FAIL: i64 = 5 |
| 43 | const NX_HTTPS_PC_READ_FAIL: i64 = 6 |
| 44 | const NX_HTTPS_PC_DECRYPT_FAIL: i64 = 7 |
| 45 | const NX_HTTPS_PC_BUF_OVERFLOW: i64 = 8 |
| 46 | const NX_HTTPS_PC_BODY_TOO_BIG: i64 = 9 |
| 47 | const NX_HTTPS_PC_VERDICT_N: i64 = 10 |
| 49 | const NX_HTTPS_PC_REQ_BUF_BYTES: i64 = 16384 // header (~512) + body (<= 8 KB) + slack |
| 50 | const NX_HTTPS_PC_BODY_BYTES: i64 = 8192 |
| 51 | const NX_HTTPS_PC_RESP_RECORD_BYTES: i64 = 16645 |
functions
| 53 | func nx_https_pc_verdict_is_valid(v: i64) -> i64 called by 1: main |
| 59 | func _pc_write_n(fd: i64, buf: *u8, n: i64) -> i64 |
| 69 | func nx_https_post_complete( |
| 182 | func main() -> i64 |