Generate redis TLS certs at test time #588
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 makes progress towards #538
Uses https://github.com/est31/rcgen to generate the certs without a dependency on openssl
Although we could get away with using openssl I would like to move to rustls one day so better to use pure rust solutions where possible.
The generated certs end up a little different to those originally generated by https://github.com/redis/redis/blob/unstable/utils/gen-test-certs.sh
Here we have the difference between the old and new redis.crt
I tried to make it use the same RSA 256 algorithm previously used but rcgen does not support that yet due to: briansmith/ring#219
But the modified tests continue to pass so I dont see any problem with using a different algorithm.
To be done in follow up PRs:
But they are low priority, I was only working on this last week due to being blocked on other work.