code wiki / (root) / nx_acme_directory_live.nx

nx_acme_directory_live.nx

buildroot/runtime/nx_acme_directory_live.nx

4973 B109 linesdepth 19pulls 127 transitivereach 0 importersview sourcekind tooltopic acme
docsdependenciesstructsconstsfunctions

about

nx_acme_directory_live.nx -- FIRST live ACME network step: GET the Let's Encrypt directory over the sovereign TLS 1.3 client and print the JSON. Unauthenticated + not rate-limited (it is the API entry point), so it is the safe bottom-up milestone: it proves TLS to LE (cert chains to ISRG Root X1, present in the Mozilla store) + HTTP parse + gives real directory JSON to build the URL extractor against. Reuses the proven live-HTTPS path (nx_https_get_live_real_ca_test): load trust store -> url_for_fetch -> url_connect -> session_run -> get_complete -> http_response_parse. Default target: STAGING is "acme-staging-v02.api.letsencrypt.org" but staging chains to the "(STAGING) Pretend Pear X1" root which is NOT in the Mozilla bundle -> validation would fail. PRODUCTION directory GET is harmless + Mozilla-trusted, so we hit production here just to read endpoint URLs; actual issuance picks the env later. license_tier: ORIGINAL (composes the shipped TLS client + HTTP parse)

dependencies 10 imports · 0 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. 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_complete.nx nx_http_response_parse.nx nx_csprng.nx nx_acme_directory_live.nx

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get_complete.nxnx_http_response_parse.nxnx_csprng.nx

imported by: nobody (leaf or entry point)

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

main nx_trust_store_load_from_c sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻ _is_space _decode_octal_escape _is_octal trust_store_alloc sys_mmap ↻ nx_x509_trust_store_load 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 ↻

structs

none

consts

30const K_MAGIC_4194304: i64 = 4194304
31const K_MAGIC_1779284141: i64 = 1779284141
32const K_MAGIC_65536: i64 = 65536
33const K_MAGIC_16384: i64 = 16384

functions

35func main() -> i64