Add TLS support #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a copy of the pull request 1 I initially opened in the https://github.com/DawnAngel/lua-nats/ repository. It unfortunately looks like DawnAngel's repository is no longer maintained, so I'm forking it here.
Hi!
This pull request implements TLS support using the luasec library, as an optional dependency.
I tested against the NATS Docker image by first generating a CA then using it to sign a certificate and a key, and starting the NATS server with:
then connecting with:
The generation setup is basically the one used in https://github.com/PowerDNS/pdns/blob/master/regression-tests.dnsdist/Makefile, if that helps.
Please feel free to ask for any kind of changes, as the existing code is very well-structured and while I tried hard to keep it that way, I'm pretty sure it's not perfect!
It closes DawnAngel#4
Best regards,
Remi Gacogne
PowerDNS.com B.V