Skip to main content
← Back to list
01Issue
BugClosedSwamp CLI
Assigneesstack72

Relationships

#1518 Deno runtime does not trust ISRG Root YR — extensions fail with valid Let's Encrypt certs

Opened by steve · 8/3/2026

Summary

Extensions using Deno's native fetch fail to connect to endpoints with valid Let's Encrypt certificates signed by the ISRG Root YR chain. The error is:

invalid peer certificate: UnknownIssuer

curl and browsers accept the cert. The root cause is that swamp's Deno runtime uses Deno's bundled CA store, which does not include the newer ISRG Root YR root certificate.

Reproduction

  1. Install @derek/palo-alto-fw and configure it against a firewall with a Let's Encrypt cert (ISRG Root YR chain)
  2. Run any method — fails with UnknownIssuer
  3. curl -v https://<host>/api/ succeeds with full TLS verification

Suggested fix

Pass DENO_TLS_CA_STORE=system to extension Deno subprocesses so extensions inherit the operating system's trust store. This would fix the issue for all extensions on macOS and Linux without requiring per-extension changes.

Secondary issue (extension-level)

The @derek/palo-alto-fw extension's skipTlsVerify option silently fails — it calls Deno.createHttpClient({ rejectUnauthorized: false }) wrapped in a bare try/catch. If the API is unavailable or the option name is wrong for the Deno version, it falls back to regular fetch with full TLS enforcement. The extension also lacks a caCert option as a workaround.

Note: @derek/palo-alto-fw has no repository declared, so this bug could not be filed against the extension directly.

Environment

  • swamp 20260803.000157.0-sha.93a34c46
  • macOS Darwin 25.6.0
  • Cert chain: CN=sinorpan.sinorlab.com → Let's Encrypt YR1 → ISRG Root YR
02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 3 MOREPR_LINKED

Closed

8/3/2026, 9:45:47 PM

No activity in this phase yet.

03Sludge Pulse
stack72 assigned stack728/3/2026, 8:38:09 PM
Editable. Press Enter to edit.

stack72 commented 8/3/2026, 9:45:47 PM

Thanks for the report, @steve. Root cause identified — this is a Deno upstream limitation, not a swamp bug. Deno's TLS stack on macOS reads static keychain entries (SecTrustSettingsCopyCertificates) instead of using the OS's full trust evaluation (SecTrustEvaluateWithError). Root CAs distributed via Apple's OTA trust updates — like ISRG Root YR — are invisible to Deno, even with DENO_TLS_CA_STORE=system.

swamp already sets DENO_TLS_CA_STORE=system,mozilla on startup, so the suggested fix (passing it to extension subprocesses) isn't needed — extensions run in-process, not as subprocesses.

Workaround: download the ISRG Root YR root certificate PEM and set:

export SSL_CERT_FILE=/path/to/isrg-root-yr.pem

This is additive — swamp merges it with the existing system and Mozilla trust stores, so all other certificates continue to work.

What we did:

  • Filed upstream: denoland/deno#36402
  • Added diagnostic hints to swamp — UnknownIssuer errors now explain the limitation and the SSL_CERT_FILE workaround
  • Filed #1520 to update the TLS docs

stack72 commented 8/3/2026, 9:50:09 PM

Thanks @steve for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.