Merge upstream CertMagic v0.25.3#7
Conversation
* use math/rand/v2 instead of math/rand * fill the contents by manually encoding pseudo-random numbers * fix variable declaration
* chore: Bump zerossl dependency * Bump test Go versions
…server#369) Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
When the ACME CA sends an HTTP-01 challenge request to an IPv6 address, the Host header is bracketed (e.g. [2001:db8::1]) without a port. net.SplitHostPort fails on this input, causing hostOnly() to return the bracketed form, which doesn't match the bare IP in challenge.Identifier.Value. Strip brackets from bare IPv6 addresses in hostOnly().
Vendor the README header PNG under docs/banner and add a dark variant selected via prefers-color-scheme so the banner reads well in GitHub dark mode. Made-with: Cursor Signed-off-by: Matt Gros <3311227+mpge@users.noreply.github.com>
* subsumed caddyserver/caddy#7619 Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
* More validation of delegated OCSP responders * Add tests
There was a problem hiding this comment.
Pull request overview
Merges upstream CertMagic v0.25.3, bringing in upstream behavior fixes (notably around IPv6 host handling and OCSP responder validation), plus dependency/toolchain updates.
Changes:
- Normalize bracketed IPv6 identifiers (e.g.
"[::1]") when looking up challenges and doing wildcard matching, with added tests. - Add OCSP responder authorization checking for delegated responders (requires
id-kp-OCSPSigning), with unit tests. - Refine handshake-time certificate load coalescing (share externally-managed cert results) and update async management to avoid serial blocking (plus various minor cleanups).
Reviewed changes
Copilot reviewed 14 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| solvers.go | Normalizes identifier via hostOnly() before challenge lookup. |
| solvers_test.go | Adds coverage for bracketed IPv6 challenge lookup. |
| certificates.go | Updates hostOnly() to handle bracket-only IPv6; uses it in MatchWildcard; rand/v2 adoption; OCSP stapling log fix. |
| certificates_test.go | Adds hostOnly() tests; adds bracketed IPv6 wildcard match cases. |
| ocsp.go | Ignores impossible pem.Encode error; enforces delegated OCSP responder EKU requirement. |
| ocsp_test.go | Adds unit tests for OCSP responder validation logic. |
| handshake.go | Introduces certLoadWaiter to share external-manager results across concurrent handshakes. |
| config.go | Moves async management per-subject into goroutines; switches to math/rand/v2; adjusts TLSConfig commentary/defaults; changes storage RW test random fill logic. |
| acmeclient.go | Adjusts ACME client logger wiring (name/stacktrace behavior). |
| cache.go | Switches to math/rand/v2 and IntN. |
| account_test.go | Starts discarding Storage.Store error (now flagged in review). |
| README.md | Switches banner to <picture> for dark-mode support using repo-local images. |
| go.mod | Updates Go version and dependency versions. |
| go.sum | Updates module checksums corresponding to go.mod changes. |
| .github/workflows/ci.yml | Updates Go versions used in CI matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d31b8d4a4e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Pulls in latest certmagic: https://github.com/caddyserver/certmagic/releases/tag/v0.25.3