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

Too many server reloads; stale certificate exposed #842

Open
tlhackque opened this issue Mar 17, 2024 · 0 comments
Open

Too many server reloads; stale certificate exposed #842

tlhackque opened this issue Mar 17, 2024 · 0 comments

Comments

@tlhackque
Copy link
Contributor

If getssl detects that a remote certificate expires sooner than a saved local certificate, an upload is attempted. Then a server reload is performed.

Later in the same run, if getssl discovers that the remote certificate has a different domain list, a new CSR is created, the certificate is signed, and the server is reloaded again.

Besides being inefficient, this means that the initial local, stale certificate is used in the interval before the correct certificate is issued and installed.
This just happened to me in real life.

A glance at the code indicates a similar scenario if the key type(s) change: the saved/stale local certificate is uploaded, then the new one is generated and uploaded.

  1. getssl should check the expiration date after verifying that the domain lists match.
  2. It should only upload the local certificate if it determines that it will not generate a new one. (for any reason)

Bottom line: Only local certificates matching the current specification should be uploaded. The RELOAD_CMD should be invoked at most once per certificate. (Of course, RELOAD_CMD itself may reload more than one server if so-configured.)

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

No branches or pull requests

1 participant