Skip to content

Tell the core which certificate a renewal replaces - #8

Merged
mervin008 merged 1 commit into
mainfrom
fix/say-which-certificate-a-renewal-replaces
Sep 29, 2026
Merged

mervin008 merged 1 commit into
mainfrom
fix/say-which-certificate-a-renewal-replaces

Conversation

@mervin008

Copy link
Copy Markdown
Contributor

What this changes

A renewal now sends renews: the certificate_id the core returned when the certificate was issued. The core's matching change in certpilot uses it to update that record in place, instead of recording a second certificate and leaving the old one ISSUED to alert later. A core that predates the change ignores the field.

How it was verified

  • Test: TestARenewalSaysWhichCertificateItReplaces, against a fake core. It failed first (no renews sent) and now passes. A first request still sends none.
  • Suite: go test ./... and go vet pass.
  • End to end: a core built from the certpilot branch, on PostgreSQL. A renewal from this build updated the existing record (renewal_count 2) rather than adding one.

🤖 Generated with Claude Code

The core recorded each renewal as a new certificate, leaving the old one
ISSUED to alert later about a certificate nothing was serving. This host
is the only thing that knows which certificate it is replacing, so a
renewal now sends it: `renews`, the certificate_id the core returned when
it was issued. The core's matching change (certpilot) updates that record
in place; a core that predates it ignores the field, which it has always
declared and never read.

Verified: TestARenewalSaysWhichCertificateItReplaces, against a fake core,
failed first (the renewal sent no renews) and passes; a first request
still sends none. go test ./... and go vet pass. End to end against a core
built from the certpilot branch on PostgreSQL: a renewal from this build
updated the existing record (renewal_count 2) rather than adding one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mervin008
mervin008 merged commit aa43b25 into main Sep 29, 2026
6 checks passed
@mervin008
mervin008 deleted the fix/say-which-certificate-a-renewal-replaces branch September 29, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant