]> git.ipfire.org Git - thirdparty/rspamd.git/commit
feat(redis): add configurable TLS for Redis connections
authorJustin Dossey <jbd@justindossey.com>
Fri, 19 Sep 2025 17:08:15 +0000 (10:08 -0700)
committercodex <codex@example.com>
Fri, 19 Sep 2025 17:08:15 +0000 (10:08 -0700)
commit2bac310de1a4a1dfbafed7f200c0d8a127baf94b
tree53b3bfdb66718ed9b6026ed85a8b168b4d3f1a91
parenteeef0dd02acace19149bd2e7e5308f97b8aba3ef
feat(redis): add configurable TLS for Redis connections

- Add TLS options to Redis config schema (ssl, no_ssl_verify, ssl_ca, ssl_ca_dir, ssl_cert, ssl_key, sni)
- Thread TLS options through lua_redis and request helpers
- Implement TLS handshake in redis pool using hiredis SSL (redisCreateSSLContextWithOptions + redisInitiateSSLWithContext)
- Keep plain connections default and support Unix sockets
- Add unit test to validate TLS options propagation (test/lua/unit/redis_tls.lua)

Tested against local TLS Redis on localhost:6379 (PING returns PONG).
lualib/lua_redis.lua
src/libserver/redis_pool.cxx
src/libserver/redis_pool.h
src/lua/lua_redis.c
test/lua/unit/redis_tls.lua [new file with mode: 0644]