-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix http3 outdated certificates after config reload #5517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm intrigued -- thanks for the patch!! Just one question; we need to make sure this is thread-safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Matt is better equipped to review the logic, but this is just some style nits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking pretty good -- does it work alright @WeidiDeng ?
Thanks for working on this!
It works fine when new config is ok. I haven't been able to test how it will react when new config load failed (i.e. when http3 is starting ok but other parts fail), but theoretically it will use the older tls.Config in this case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates. I'm willing to give this a try in the 2.7 beta 👍
Caddy http3 will serve outdated certificates is config is reloaded because caddy tries to reuse existing quic listeners. However, because after config reload, old tls.Config won't update its certificates anymore. We could disable quic listener reuse, but by changing
GetConfigForClient
field, quic listener will use latest certificates anyway.Fix https://github.com/caddyserver/caddy/issues/4849.