nx_lib_fetch_cookie.nx
buildroot/runtime/nx_lib_fetch_cookie.nx
about
nx_lib_fetch_cookie.nx -- sovereign HTTPS GET with a browser UA + Cookie
header, for sources gated behind a cookie (e.g. a solved proof-of-work).
Same TLS-1.3 connect+handshake as nx_lib_fetch; request builder + round-trip
modeled on nx_https_get_spoof's sp_build/sp_get_complete (which lives in a
main-bearing organ, so cannot be imported). license_tier: ORIGINAL
dependencies 10 imports · 1 importers
imports: nx_syscalls.nxnx_csprng.nxnx_x509_trust_store.nxnx_tls13_client_session_run.nxnx_tls13_client_session.nxnx_tls13_record.nxnx_tls13_read_record_from_fd.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get_complete.nx
imported by: nx_lib_pmc_pow.nx
structs
| none |
consts
| 16 | const K_MAGIC_8192: i64 = 8192 |
functions
| 18 | func lfc_puts(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } called by 1: lfc_build |
| 20 | func lfc_write_n(fd: i64, buf: *u8, n: i64) -> i64 |
| 27 | func lfc_build(path: *u8, plen: i64, host: *u8, hlen: i64, cookie: *u8, clen: i64, out: *u8) -> i64 |
| 42 | func lfc_get_complete(s: *Tls13ClientSession, fd: i64, path: *u8, path_len: i64, host: *u8, host_len: i64, cookie: *u8, clen: i64, out_buf: *u8, out_cap: i64) -> i64 |
| 89 | func nx_lib_fetch_cookie(store: *TrustStore, url_str: *u8, cookie: *u8, clen: i64, out_buf: *u8, out_cap: i64) -> i64 |