Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clear memoized x509 cert on Cert#cert_pem assignment #10

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

benburkert
Copy link
Contributor

When a Puma::Acme::Cert is renewed, the new cert is assigned by calling the cert_pem= method. The instance memoizes the parsed OpenSSL x509 object, but was not taking changes to the cert_pem into account. This was causing renewed certs to keep using the old expired/expiring cert instead of the replacement. The pstore library is capable of marshaling & unmarshaling the @x509 member, so this inconsistency is present in instances loaded from the pstore cache.

When a Puma::Acme::Cert is renewed, the new cert is assigned by calling
the cert_pem= method. The instance memoizes the parsed OpenSSL x509
object, but was not taking changes to the cert_pem into account. This
was causing renewed certs to keep using the old expir(ed/ing) cert
instead of the replacement. The pstore library is capable of marshaling
& unmarshaling the @x509 member, so this inconsistency is present in
instances loaded from the pstore cache.
@benburkert benburkert self-assigned this Jun 27, 2024
@benburkert benburkert requested a review from geemus June 27, 2024 15:20
@benburkert benburkert merged commit 79a7386 into main Jul 15, 2024
5 of 6 checks passed
@benburkert benburkert deleted the fix-x509-caching branch July 15, 2024 14:36
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.

2 participants