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

Simplify GetCertificate to reload certificate on each request, remove maybeReload and goroutine in newKeypairReloader #16

Open
chaospuppy opened this issue Apr 23, 2023 · 0 comments

Comments

@chaospuppy
Copy link
Owner

Summary

Currently, we are using tls.Config.GetCertificate() to retrieve the certificate from the cert property of keypairReloader. Additionally, we're running a goroutine as part of newKeypairReloader that waits 60 seconds before updating the cert property of keypairReloader.

Because GetCertificate is called upon each ClientHello, this extra gorountine and timer represents an unnecessary step in the process and should be removed, with the process of loading the configured TLS keypair into a keypair object moved into maybeReload, which itself should be called in the function returned by GetCertificate.

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