Skip to content

v1.100.0

Choose a tag to compare

@github-actions github-actions released this 15 Nov 03:59
· 20 commits to main since this release

Which file do I need?

You want Download
The desktop app ApiTester.App.exe
The command line certapi.exe
HTTP/3 (--http3) with either msquic.dll, saved in the same folder

Both are self-contained: nothing else to install, no .NET needed. Keep them in one folder and the app's update prompt, or certapi update, keeps them current.

With Scoop: scoop install https://github.com/Real-Fruit-Snacks/certapi/releases/download/v1.100.0/certapi.json

Every file's SHA-256 is in SHA256SUMS.txt. The rest are for building from source (the source at this tag, and a dev kit that builds and tests with no network) and a copy of the fuzz wordlist built into certapi.exe.

What's new

Added

  • certapi curl: paste a curl command and it runs with curl's meaning, through send — the
    Windows certificate store, --timing, --assert and the rest still apply, and can be added to
    the pasted line. Redirects are followed only with -L, -d is a form body and several are
    joined with &, -d @file drops line breaks, --json <data> sends JSON, -v turns on
    --debug, -c saves cookies, and -E/--cert takes a file, file:password, or curl's
    Windows CurrentUser\MY\<thumbprint>. One quoted argument is split as a shell would, browser
    "Copy as cURL" (bash or cmd) included.
  • send reads more of curl's own spellings: bundled switches (-sSL, -sk), values attached to
    their letter (-XPOST, -HAccept:x, -d{}), -L/--location, --compressed, -S, -#,
    -e/--referer, --data-raw (a literal body), --data-binary, -T/--upload-file (PUT),
    -G/--get (data into the query), -O/--remote-name, --url, -m, --fail-with-body,
    --oauth2-bearer, --tlsv1.2/--tlsv1.3 and -E <file[:password]>. Most of these were refused
    with a hint before. -L, --compressed, --tlsv1.x and -E work on every command that has
    the option they stand for. curl's --json <data> is refused with what to use, since certapi's
    --json prints an envelope.
  • mock --tls and --mtls keep their certificates in --cert-dir and use them again on the next
    start, so mock-ca.cer is trusted once and mock-client.pfx stays the same. The private keys
    are kept encrypted to the Windows account (DPAPI). New ones are made when the kept ones are
    missing or near expiry, or with the new --new-certs; a --tls-mode certificate is still made
    each time. Starting mock --mtls is quicker for it (on Windows, 270 ms → 165 ms).

Changed

  • certapi.exe takes its culture data from Windows (NLS) instead of loading ICU, about 10 ms
    sooner on every command that prints a number or a date (send 111 → 102 ms, certs
    85 → 75 ms). What it prints is the same.
  • A refused connection to this machine is reported at once instead of after two seconds. Windows
    retries a refused connect twice, so every send to a local server that was down took 2 s (a
    20-request run against one: 41 s), and so did every new connection to http://localhost:<port>
    when the server listened on 127.0.0.1 only, since localhost is tried as ::1 first. The
    retries are now turned off for loopback addresses only — a real network keeps them, since a SYN
    can be lost there — and only while nothing listens on the port: Windows refuses the same way
    when a server's queue of waiting connections is full, so a refusal from a port something does
    listen on is retried as before, and a busy local server still takes every connection. send,
    run, curl, doctor, tls, the streams, grpc, serve and a proxy on this machine all get
    it.
  • tls no longer waits a fixed 400 ms after every TLS 1.3 handshake. A server that asked for no
    certificate is given two round trips and a margin to ask late (50 ms to a nearby one: 692 ms →
    391 ms); one that asked is given half a second to refuse the certificate, since that is when a
    refusal shows (see Fixed).
  • selftest and a mock making new certificates generate their RSA keys in parallel.
  • send --har, run --json and certs --json write their JSON without the reflection serializer,
    which spent 30–60 ms building metadata first; the output is byte for byte the same.
  • Every command starts a little sooner: the --help check no longer builds an expression per
    option when no -h/--help was typed, and a URL, header or body with no {{ skips variable
    resolution, and with it the one-time set-up of every generated expression.
  • mock checks its kept certificates by their signature instead of building a chain.
  • send --json writes its envelope directly instead of through the reflection serializer, about
    50 ms sooner on Windows (201 ms → 147 ms against a local server). The text is the same, byte
    for byte; mcp's send tool gets the same saving.
  • --debug lines say when they happened: debug: [+0.059s] …, counted from the start of the
    process, so a slow step shows as a gap. The first line names the version and runtime, and new
    lines say how long the workspace and the certificate store took to read. --log-file lines carry
    the same offset.
  • Large responses use about half the memory: the body is read once, into an array of its own size,
    instead of being buffered and then copied (a 286 MB download: 689 MB peak → 341 MB, and about
    twice as fast). The time reported and the request timeout still include the body.
  • The app's Pretty view formats a JSON body over 4 MB too, for as much as it shows, instead of
    showing it unformatted; it reads only as far as it formats, so a 28 MB body costs the app 65 ms
    rather than the second it took to format all of it.
  • The app's Pretty view shows the first 128 K characters of a large body (was 512 K): laying out
    512 K characters of coloured text held the window for about 0.9 s. Raw still shows the first
    1 MB, and Copy and Save… take all of it.
  • Text output to a file or a pipe is no longer slowed by .NET's 256-byte console buffer, which on
    Windows made every 256 bytes a separate system call: --pretty and --json on a 28 MB body
    took 11 s and 9 s when redirected. Redirected stdout now has a 64 KB buffer, still flushed after
    every write, so sse, ws, a server's log and MCP replies still appear as they happen.
  • --pretty on a large JSON body writes the formatted text as it goes instead of building it in
    memory first (28 MB of JSON: 431 MB peak → 87 MB). The output is byte-for-byte the same.
  • Faster start-up: certapi.exe and the app are published ReadyToRun and no longer compressed.
    On Windows x64, certapi send to a local server went from 240 ms to 134 ms and its peak memory
    from 89 MB to 46 MB; the app's window is ready in 0.73 s instead of 1.0 s, using 131 MB instead
    of 225 MB. The downloads are larger for it: about 95 MB and 160 MB.
  • mock keeps connections alive between requests, so bench against it measures requests
    rather than handshakes. --no-keep-alive answers Connection: close as before.
  • Requests through a proxy reuse their connection: the CONNECT tunnel and its TLS handshake are
    made once per site instead of once per request, so a suite, bench or the app behind a
    corporate proxy no longer pays a tunnel and a handshake for every call. HTTP/3 connections are
    pooled the same way. Each response still reports the server certificate it was sent over.
  • A large workspace loads faster on every command-line run: it is read with a serializer generated
    at build time instead of reflection (send with a 2 MB workspace: 170 ms → 130 ms). The file
    written is byte-for-byte the same.
  • mock sends each response without waiting on Nagle's algorithm, which could hold the body of
    every response on a kept-alive connection for a delayed ACK (about 40 ms behind a proxy).
  • The regular expressions used on every request ({{variables}}, URL rewriting, log redaction and
    others) are generated at build time instead of compiled at start-up.

Fixed

  • tls said "client certificate not requested" for a server that requires one, when no --cert
    was given — the ordinary case for a Windows server, which sends its certificate request with no
    list of issuers. It now counts the request either way, and says when the server ends the
    connection just after the handshake: refused … it requires a client certificate, or with
    --cert, refused … it did not accept the certificate sent (exit 1). A client finishes its
    side of the handshake before the server judges its certificate, so this is where an mTLS
    refusal shows.
  • ws -m … --expect 1 no longer waits for ever when stdin is a pipe nobody closes (a CI step, a
    scheduled task, a parent script): piped lines are sent as they arrive instead of being read to
    the end before connecting.
  • mock listens on ::1 as well as 127.0.0.1. localhost resolves to ::1 first on Windows,
    and the refused connection there cost about two seconds before every new connection to
    https://localhost:<port> — the name the mock's certificate is for. The certificate now names
    127.0.0.1 and ::1 too, so https://127.0.0.1 passes a trust check against mock-ca.cer.
  • bench no longer claims connections were pooled and reused when the server answered
    Connection: close; it says how many responses closed their connection (closedByServer in
    --json).
  • --help for browse, call, cors, crawl, mock, mqtt, signalr and tls now ends with
    the global options line like every other command. crawl --help lists the certificate and
    transport options in full instead of pointing at send, and mqtt --help lists --workspace.

Full Changelog: v1.99.0...v1.100.0