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

Implements #23 - Ensure if servername config changes that certs are updated #26

Merged
merged 1 commit into from
Jul 20, 2023
Merged

Implements #23 - Ensure if servername config changes that certs are updated #26

merged 1 commit into from
Jul 20, 2023

Conversation

zsteinkamp
Copy link
Contributor

Proposed changes

Recognize if njs_acme_server_names no longer matches the stored certificate. If so, request a new cert with the configured names.

Also includes a handful of small changes for DRYing up (e.g. adds acmeCommonName(r) and acmeAltNames(r) methods), defines some more specific types, renames some variables/methods to be more accurate. Adds a second server name to the example config to demonstrate this clearly.

These changes ended up making the PR bigger than I expected. Happy to remove the changes to make this one lean.

TODO: Add unit tests when #24 is merged (contains unit test framework improvements).

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • I have updated any relevant documentation (README.md and CHANGELOG.md)

Copy link
Contributor

@ivanitskiy ivanitskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zsteinkamp zsteinkamp marked this pull request as ready for review July 20, 2023 00:27
…he certificate.

Also refactors some repeated expressions into utility methods and renames some internal variables and methods to be more accorate and adds a second hostname to the example configuration.
@ivanitskiy ivanitskiy merged commit 435efe5 into nginx:main Jul 20, 2023
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