code wiki / (root) / nx_https_get_live_demo_test.nx

nx_https_get_live_demo_test.nx

buildroot/runtime/nx_https_get_live_demo_test.nx

5077 B131 linesdepth 21pulls 124 transitivereach 0 importersview sourcekind gate/prooftopic https
docsdependenciesstructsconstsfunctions

about

nx_https_get_live_demo_test.nx -- LIVE-FIRE demo against a real public HTTPS endpoint. Calls nx_https_get("https://example.com/", ...) with an EMPTY trust store, and asserts the failure mode is exactly the expected one (HANDSHAKE_FAIL caused by no trust anchor matching the real public cert chain). This proves -- against a real public server, no mocks -- that the substrate's lower layers all work: - nx_https_url_for_fetch parses the URL - nx_https_url_connect does DNS via real Cloudflare 1.1.1.1 (commit dfebc8bc wired this) + TCP connect to the resolved IP on port 443 - nx_tls13_client_session_run drives the handshake far enough to receive the server's Certificate message - The chain pipeline rejects the chain because no CA anchor is in the (empty) trust store What's NOT proven by this test: - Successful trust-anchor lookup (needs a real CA bundle) - Successful CV signature verification on the real server's CertificateVerify (currently stubbed; would matter once gap I lands) - HTTP layer working (we never reach it; handshake fails) expect_exit: 0 license_tier: ORIGINAL

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_tls13_client_validate_certifica nx_tls13_client_session_run.nx nx_https_url_for_fetch.nx nx_https_url_connect.nx nx_https_get.nx nx_https_get_live_demo_test.nx

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get.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 trust_store_alloc sys_mmap ↻ nx_https_get sys_now_ms sys_mmap ↻ sys_clock_gettime_mono nx_url_new sys_mmap ↻ nx_https_url_for_fetch nx_url_parse strlen _scheme_is_https nx_https_url_connect sys_socket sys_set_socket_timeout sys_mmap ↻ sys_setsockopt sys_munmap sys_mmap ↻ nx_https_build_sockaddr nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close sys_setsockopt ↻ nx_dns_resolve_default nx_dns_resolve_with_failov nx_dns_resolve_a_record sys_mmap ↻ nx_dns_build_query sys_socket ↻ sys_set_socket_timeout ↻ sys_sendto sys_close ↻ sys_recvfrom nx_dns_parse_response_a

structs

none

consts

none

functions

38func main() -> i64