Skip to contents

This article explains why zuhttp takes its trust from the operating system, when another client is the better choice, and what this release does not do. The code below is not run when the site is built: it depends on hosts and platform updates that change over time, so the #> lines are recorded output.

Native trust versus a static CA bundle

When a certificate authority is compromised, what protects you depends on where your HTTP client gets its trust from. A native trust store is the operating system’s own: its trust evaluator receives emergency blocks through ordinary OS updates, and can distrust a single intermediate certificate while the root above it stays trusted. A static trust store is a file of root certificates, a CA bundle such as /etc/ssl/cert.pem or cacert.pem. It changes only when someone ships a new file, and it can only add or remove whole roots.

zuhttp asks the native evaluator wherever the platform has one: SecTrust on macOS and the Windows certificate store through Schannel. A certificate the operating system has blocked is refused with no configuration, and an enterprise MDM root or a corporate proxy CA already installed on the machine simply works. There is no CA bundle to go stale and no vendored TLS library to track for CVEs. The package is small enough to audit, and its behaviour under malformed input is fuzzed rather than assumed.

The eMudhra incident of October 2026 shows the difference. Eight intermediate CA certificates had private keys anyone could recover, and they sit under roots that stay trusted, so a CA bundle has no way to exclude them; only a trust evaluator can. Apple blocked them on 22 October. On a Mac that had received that update (macOS 15.7, 30 October), zuhttp refused every test host. A client that reads a static bundle did not: R’s curl package, which on macOS uses LibreSSL and the bundle at /etc/ssl/cert.pem, connected to every one. That is a property of the bundle, not a flaw in curl; any client built on the same file behaves the same way.

u <- "https://dv-g3b-emudhra.we-have-a-problem.com/"
tryCatch(zu_get(u), zu_tls_certificate_error = conditionMessage)
#> [1] "certificate verification failed for 'dv-g3b-emudhra.we-have-a-problem.com': “dv-g3b-emudhra.we-have-a-problem.com” certificate is blocked"
curl::curl_fetch_memory(u)$status_code
#> [1] 200

On a Mac that had not yet received it, zuhttp still refused the two hosts whose certificates were never logged for Certificate Transparency, which Apple’s evaluator requires; curl connected to those as well.

The difference is the platform’s, and it is not the same everywhere. On Linux zuhttp reads the distribution’s bundle, a file like any other. On Ubuntu 24.04 both clients refused these hosts, but only because the bundle lacks their issuer, not because of a block. On a GitHub Windows runner, which had not received Microsoft’s block, both connected. The TLS article has the table for each platform, and tools/check-trust-blocks.R in the repository repeats the measurement.

When curl is the better choice

zuhttp does one thing; curl does a great deal more, and is the right choice for:

  • Anything needing HTTP/3 or a non-HTTP protocol.
  • Anything needing NTLM, Kerberos, or cloud-provider request signing.
  • Anything relying on libcurl’s decade of workarounds for badly behaved servers.
  • Any project that cannot accept a single-maintainer dependency for security-critical code. curl inherits libcurl’s security response; zuhttp has none to inherit. See the Security section of the README.
  • Forked parallelism with HTTPS on macOS; see the limits below.

Choosing curl after reading that list is a reasonable decision.

Known limitations

These are documented limits, not open defects. Most are a consequence of using the platform’s TLS stack instead of shipping one. zu_info() reports which zu_tls() settings this build supports; a setting it cannot honour raises before any connection is made, never downgrades.

Limitation Where Detail
TLS 1.2 maximum Windows The Schannel build in Rtools lacks SCH_CREDENTIALS. zu_tls(min_version = 13) raises rather than silently giving you 1.2. ?zuhttp_tls
HTTPS through a proxy needs macOS 14 macOS 11–13 Network.framework runs the proxy’s CONNECT itself, and its API for that starts with macOS 14. Earlier, a proxied HTTPS request raises zu_proxy_error rather than going direct. Plain HTTP through a proxy works everywhere. ?zuhttp_tls
No certificate pinning macOS, Windows Pinning needs the leaf’s SubjectPublicKeyInfo, which neither platform yields without hand-parsing DER, and that parser is not written yet. zu_tls(pins = ) raises zu_tls_unsupported_error rather than connecting unpinned. OpenSSL pins.
No custom CA Windows Neither ca_file (replace) nor ca_extra (add) is implemented on Schannel yet. Both raise rather than falling back to the Windows store. They work on macOS and OpenSSL.
HTTPS in a forked child fails macOS The system TLS engine does not survive fork(). Raises zu_fork_error instead of killing the worker. Use a PSOCK cluster or future::plan("multisession"). ?zuhttp_fork
Revocation off by default, and opting in is backend-dependent all zuhttp asks for no revocation check by default; macOS may check Apple’s own revocation data anyway, run by run, and OpenSSL and Schannel check nothing. zu_tls(revocation = TRUE) opts in on macOS and Windows; macOS also rejects valid certificates from CAs that no longer answer revocation queries. On OpenSSL, which has no CRL or OCSP source, it raises rather than failing every chain. ?zuhttp_tls
Trust freshness on Linux Linux Trust comes from the distribution’s ca-certificates bundle through OpenSSL’s default verify paths, a file updated at the distribution’s pace. A bundle can drop a root but cannot block an intermediate beneath one, which is how Apple blocked the eMudhra intermediates (see above).
No parallel or async requests all One request at a time. Parallelism is the caller’s, via a non-forking plan.
Only a total timeout all timeout bounds the whole request, redirects and retries included. There are no separate connect, first-byte or inactivity timeouts yet.
DNS ignores timeout and Ctrl-C Linux, Windows; macOS for http:// Name resolution calls the system resolver synchronously (getaddrinfo), so a stalled resolver can hold R until it gives up. Every later phase is bounded. HTTPS on macOS is bounded throughout: Network.framework resolves the name itself. ?zuhttp_tls
Ctrl-C timing unverified all Cancellation works once a request is past DNS; the 200 ms bound is not yet measured on every front-end.

Status

v0.1.0 is a first release, not a 1.0. The request functions, response accessors and conditions are the stable API: from 0.1.0 on, an export is removed only after a deprecation release. The testing tools (zu_mock_transport(), zu_stub(), zu_response(), the cassettes) are experimental and may still change. It has not been through the external security review that 1.0 requires. It is suitable for use.