code wiki / (root) / nx_porkbun_ping_probe.nx

nx_porkbun_ping_probe.nx

buildroot/runtime/nx_porkbun_ping_probe.nx

19406 B422 linesdepth 21pulls 137 transitivereach 0 importersview sourcekind probetopic porkbun
docsdependenciesstructsconstsfunctions

about

nx_porkbun_ping_probe.nx -- THROWAWAY DIAGNOSTIC for the Porkbun TLS/HTTP "empty response" failure (nx_porkbun_set_txt). Pinpoints WHERE the round-trip to api.porkbun.com breaks: PROBE B (root-cause): manual handshake to api.porkbun.com, capture the server's Certificate handshake message, dump the chain shape (n_certs, per-cert sig_len/sig_alg/DN, trust-anchor lookup), then run the EXACT validation the real client runs (nx_https_cert_pipeline_verify_with_store) and print its sealed verdict by name. This says "TLS handshake OK but cert validation returned NO_TRUST_ANCHOR / CHAIN_SIG_FAIL / LEAF_* / ..." -- the precise failure point. PROBE A (end-to-end): full client stack (nx_tls13_client_session_run + nx_https_post_complete) doing a Porkbun PING POST (read-only; returns your IP). Prints session_run's exact stage verdict on failure, or the HTTP status + body on success. Uses real wall-clock now() + the live Mozilla trust store, matching nx_acme_dns01_issue exactly. Creds come from the sovereign vault decrypt output /tmp/nxsecret.out (line1=apikey, line2=secretapikey). license_tier: ORIGINAL (throwaway probe; composes shipped primitives)

dependencies 21 imports · 0 importers

nx_syscalls.nx nx_csprng.nx nx_url.nx nx_https_url_for_fetch.nx nx_https_url_connect.nx nx_https_post_complete.nx nx_tls13.nx nx_tls13_record.nx nx_tls13_read_record_from_fd.nx nx_tls13_client_session.nx nx_porkbun_ping_probe.nx

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

imports: nx_syscalls.nxnx_csprng.nxnx_url.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_post_complete.nxnx_tls13.nxnx_tls13_record.nxnx_tls13_read_record_from_fd.nxnx_tls13_client_session.nxnx_tls13_client_session_recv_sh.nxnx_tls13_client_session_run.nxnx_tls13_client_validate_certificate.nxnx_tls13_auth.nxnx_https_cert_pipeline.nxnx_x509.nxnx_x509_sig_alg.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_http_response_parse.nxnx_acme_porkbun.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

45const K_MAGIC_1024: i64 = 1024
46const K_MAGIC_2048: i64 = 2048
47const K_MAGIC_16645: i64 = 16645
48const K_MAGIC_65536: i64 = 65536
49const K_MAGIC_16384: i64 = 16384
50const K_MAGIC_4194304: i64 = 4194304

functions

53func pb_str(fd: i64, s: *u8) -> i64
59func pb_dec(fd: i64, v: i64) -> i64
71func pb_pipe_name(v: i64) -> *u8
87func pb_run_name(v: i64) -> *u8
called by 1: pb_probe_cert
100func pb_found(a: *TrustAnchor) -> i64
called by 1: pb_dump_chain
105func pb_hs_complete(m: *u8, mlen: i64) -> i64
118func pb_hex(fd: i64, buf: *u8, n: i64) -> i64
136func pb_is_hrr(rnd: *u8) -> i64
calls 1: sys_mmap
151func pb_write_all(fd: i64, buf: *u8, n: i64) -> i64
calls 1: sys_write
162func pb_dump_chain(cert_msg: *u8, cert_msg_len: i64, store: *TrustStore) -> i64
207func pb_probe_cert(store: *TrustStore, now: i64) -> i64
333func pb_probe_e2e(store: *TrustStore, now: i64, ak: *u8, akn: i64, sk: *u8, skn: i64) -> i64
391func main() -> i64