code wiki / (root) / nx_https_get.nx

nx_https_get.nx

buildroot/runtime/nx_https_get.nx

9605 B228 linesdepth 20pulls 123 transitivereach 170 importersview sourcekind tooltopic https
docsdependenciesstructsconstsfunctions

about

nx_https_get.nx -- THE TOP-LEVEL USER-FACING HTTPS FETCH PRIMITIVE. This is the single call that wraps the 4 wiring-arc steps into one user-facing primitive. Takes a URL string + entropy + trust store + clock + output buffer, returns the response bytes (HTTP headers + body) accumulated until peer-close. Step 5 of the nx_https_client wiring arc -- the convenience wrapper that turns 4 discrete shipped primitives into a one-liner the rest of the substrate (Browser arc / NX-INGEST / etc.) calls. Composes 4 shipped substrate primitives: 1. nx_https_url_for_fetch -- URL parse + scheme + port 2. nx_https_url_connect -- URL+DNS+TCP → fd 3. nx_tls13_client_session_run -- full TLS 1.3 handshake 4. nx_https_get_complete -- HTTP GET round-trip Plus internal: builds TlsValidationContext from (store, host from parsed URL, now_epoch); calls sys_close on fd to release the socket after response received. Public API: nx_https_get( url_str: *u8, NUL-terminated URL client_random: *u8, 32 bytes of entropy x25519_priv: *u8, 32 bytes ephemeral key store: *TrustStore, boot-loaded CA bundle now_epoch_secs: i64, for cert validity check out_buf: *u8, out_cap: i64 ) -> POSITIVE bytes_received | NEGATIVE -NX_HTTPS_GET_* code nx_https_get_verdict_is_valid(v) -> 0|1 Sealed verdict (one per failure mode, mapped from sub-step verdicts): NX_HTTPS_GET_OK NX_HTTPS_GET_BAD_URL url_for_fetch returned non-OK NX_HTTPS_GET_CONNECT_FAIL url_connect returned non-OK NX_HTTPS_GET_HANDSHAKE_FAIL session_run returned negative NX_HTTPS_GET_FETCH_FAIL get_complete returned negative

dependencies 10 imports · 65 importers

nx_syscalls.nx nx_url.nx nx_x509_trust_store.nx nx_tls13_client_validate_certifica nx_tls13_client_session.nx nx_tls13_client_session_run.nx nx_tls13_chrome_session.nx nx_https_url_for_fetch.nx nx_https_url_connect.nx nx_https_get_complete.nx nx_https_get.nx _uj_probe.nx _wt_probe_one.nx nishi.nx nx_acme_directory_live_real_ca_tes nx_app_monitor.nx nx_aw_verify_gate.nx nx_browse.nx nx_browser.nx nx_browser_own_site_live_test.nx nx_cad_verify_gate.nx

diagram shows first 10 each side; +0 more imports, +55 more importers in the complete lists below.

imports: nx_syscalls.nxnx_url.nxnx_x509_trust_store.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session.nxnx_tls13_client_session_run.nxnx_tls13_chrome_session.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get_complete.nx

imported by: _uj_probe.nx_wt_probe_one.nxnishi.nxnx_acme_directory_live_real_ca_test.nxnx_app_monitor.nxnx_aw_verify_gate.nxnx_browse.nxnx_browser.nxnx_browser_own_site_live_test.nxnx_cad_verify_gate.nxnx_crawl_https.nxnx_diora_live_reach.nxnx_entity_media.nxnx_entity_seeds.nxnx_evidence_gather.nxnx_external_reach_probe.nxnx_fetch_dump.nxnx_fetch_jellyfin_test.nxnx_fetch_print.nxnx_fetch_unit.nxnx_gallery_auth_research_fetch.nxnx_health_eval.nxnx_hf_probe.nxnx_hls_live_probe.nxnx_http_head_probe.nxnx_https_get_live_demo_test.nxnx_https_get_live_github_test.nxnx_https_get_live_google_test.nxnx_https_get_live_real_ca_test.nxnx_https_get_spoof.nxnx_https_get_test.nxnx_hub_lib_verify_gate.nxnx_hub_verify_gate.nxnx_iot_fetch_probe.nxnx_iot_verify_gate.nxnx_library_fetch.nxnx_live_https.nxnx_live_https_reach.nxnx_magnet_discover.nxnx_media_gather.nxnx_model_fetch.nxnx_night_fetch_test.nxnx_nishios_net_wire.nxnx_nist_unwall.nxnx_nist_verify_gate.nxnx_onsite_frontier_fetch.nxnx_onsite_research_fetch.nxnx_orch_verify_gate.nxnx_research_fetch_wiki_test.nxnx_revimg_crawl_run.nxnx_scilib_verify_gate.nxnx_sclass_ux_research_fetch.nxnx_semantic_research_fetch.nxnx_site_probe.nxnx_ui_live_verify.nxnx_url_probe.nxnx_url_truth_gate.nxnx_uxf_fetch_avro.nxnx_uxf_fetch_protobuf.nxnx_video_get.nxnx_web_crawl_breadth.nxnx_web_crawl_index.nxnx_webpub_fetch.nxnx_wpt_fetch.nxnx_zerodt_fetch.nx

structs

none

consts

82const NX_HTTPS_GET_OK: i64 = 1
83const NX_HTTPS_GET_BAD_URL: i64 = 2
84const NX_HTTPS_GET_CONNECT_FAIL: i64 = 3
85const NX_HTTPS_GET_HANDSHAKE_FAIL: i64 = 4
86const NX_HTTPS_GET_FETCH_FAIL: i64 = 5
87const NX_HTTPS_GET_VERDICT_N: i64 = 6

functions

89func nx_https_get_verdict_is_valid(v: i64) -> i64
called by 1: main
97func _hg_pn(v: i64) -> i64
called by 1: nx_https_get calls 2: sys_mmapsys_write
108func nx_https_get(
226func main() -> i64