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

If secret doesn't exist, return fs.ErrNotExist #100

Merged

Conversation

nilathedragon
Copy link
Contributor

Certmagic expects fs.ErrNotExist when the Private Key cannot be found, else it assumes some other error happened. So if there is no existing private key, this will fail and no new key will be generated.

This PR uses the apimachinery errors package to check for a notFound error and returns the correct error to certmagic so a new private key can be created.

Copy link
Member

@Embraser01 Embraser01 left a comment

Choose a reason for hiding this comment

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

Good catch, thanks!

@Embraser01 Embraser01 merged commit 769911d into caddyserver:master Aug 22, 2022
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.

None yet

2 participants