caddy/modules/caddypki
Herman Slatman 9738f49b95
pki: Handle error immediately after reading root from disk (#7896)
In https://github.com/caddyserver/caddy/pull/7057, the behavior
of `KeyPair.Load` was changed to return a certificate chain. While
the change was primarily meant for intermediates, it also affected
how a root (or roots) were loaded. The existing error handling
logic relied on a shared `err != nil` check, but with the new
behavior there's no guarantee that there's actually a root in
the PEM file on disk.

This commit handles the error immediately after reading the PEM
from disk.

Fixes: #7895
2026-07-19 23:59:46 -04:00
..
acmeserver tls: Add `tls_resolvers` global option for DNS challenge configuration (#7297) 2026-03-01 15:32:04 -05:00
adminapi.go chore: Add nolints to work around haywire linters (#7493) 2026-02-17 16:52:54 -07:00
ca.go pki: Handle error immediately after reading root from disk (#7896) 2026-07-19 23:59:46 -04:00
certificates.go
command.go
crypto.go chore: Add nolints to work around haywire linters (#7493) 2026-02-17 16:52:54 -07:00
crypto_test.go
maintain.go
maintain_test.go
pki.go