Skip to content

fix(certmanager): drop stale in-flight handshakes after ForceRenew (F54) - #85

Merged
ersinkoc merged 2 commits into
mainfrom
audit/certmanager-F003
Nov 4, 2026
Merged

ersinkoc merged 2 commits into
mainfrom
audit/certmanager-F003

Conversation

@ersinkoc

@ersinkoc ersinkoc commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

A TLS handshake in flight during ForceRenew could write the old certificate back into lastCert after the autocert manager was swapped.

Fix: GetCertificate pins the manager it started with; publishLeaf only publishes if that manager is still current.

Regression test: TestForceRenew_StaleHandshakeDoesNotRepublish (gated completion order). Verified 3x with -race. Note: autocert itself may still re-cache the old cert from a stale handshake; not proven, not addressed.

A handshake that started on the pre-renewal autocert manager republished its
leaf into lastCert after ForceRenew had cleared it. Publish only while the
handshake's manager is still current.
@ersinkoc
ersinkoc merged commit 8357c7b into main Nov 4, 2026
6 checks passed
@ersinkoc
ersinkoc deleted the audit/certmanager-F003 branch November 4, 2026 12:57
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