Skip to content

std.http rides std.tls, a hand-written TLS stack users won't trust with credentials: audit it or back std.http with a vetted engine #3134

Open

Description

@ehartford

Part of #3115.

The postal-mcp user (sending provider API keys and spending money over HTTPS) chose libcurl over std.http because std.http runs on std.tls, With's own TLS implementation. That is a reasonable call today, and it pushes every networked program into the C path this epic is about.

Decide one of: (a) an external review of std.tls (handshake, certificate validation, constant-time crypto) with the findings fixed and published; (b) std.http backed by a vetted engine (a migrated corpus of a TLS library under std.engines, as zlib and pcre2 back std modules); (c) std.http over libcurl as a toolchain-owned engine. Until one lands, the std.http docs should say plainly what std.tls has and has not been reviewed for.

Activity

  1. ehartford commented on Nov 24, 2026

    @ehartford
    ContributorAuthor

    The part that needed no decision is in a PR that follows: the heads of std/tls.with and std/http.with now say what the TLS stack does and does not do, each line checked against the source at 4019b4a:

    • Does: a TLS 1.2 client; four suites (ECDHE with AES-128-GCM or ChaCha20-Poly1305, RSA or ECDSA certificates); the certificate chain checked to the operating system's trust store, the host name checked against the leaf, the server's key-exchange signature checked.
    • Does not: TLS 1.3, a server, session resumption, any revocation check (no OCSP, no CRL anywhere in std.tls or std.crypto).
    • Not established: no review from outside the project, and nothing in std.crypto has been analysed for timing side channels or claims constant time.

    The decision is the issue's own (a), (b) or (c), and it is Eric's: an outside review of std.tls with the findings fixed; std.http over a migrated TLS engine under std.engines; or std.http over libcurl as a toolchain-owned engine. One fact bearing on (b): the OpenSSL corpus campaign (D170) is the migrated-engine route already under way. One bearing on (c): it would make every networked program depend on with get working for libcurl on every platform, which it does not yet on linux-aarch64 (#2757).

    Labelled human attn needed.

  2. ehartford commented on Nov 25, 2026

    @ehartford
    ContributorAuthor

    Ruled by Eric, 2026-11-25 (answers to briefs.md).

    (b): std.http over a migrated TLS engine, with the notes of #3593 as the interim; (a) can run beside it. Label removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions