redis-rb
redis-rb copied to clipboard
SSL not supported by hiredis driver message
Im using the latest version of redis-rb which is version 4.6.0 and also of hiredis gem, version 0.6.3. Im trying to connect to a Redis cluster in AWS which has in transit encryption enabled as follows:
client = Redis.new(url: 'the url here', ssl: true)
I get the following response:
NotImplementedError (SSL not supported by hiredis driver)
Also, trying to do client = Redis.new(url: 'the url here', ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }) leads to a Connection Timeout.
I saw that hiredis C library has enabled SSL support (https://github.com/redis/hiredis/pull/645 ). However, is SSL support still not available in the ruby version ?. Is there any other way to get SSL working with redis in ruby ?
It seems that we are not ready to use the feature yet.
https://github.com/redis/redis-rb/blob/4e76b035a98ce2c7bd7666a1553fc4394279ca83/lib/redis/connection/hiredis.rb#L12-L29
- #828
- #1077
- https://github.com/redis/hiredis-rb/issues/58
- https://github.com/redis/hiredis-rb/pull/72
You can use the default connector. https://github.com/redis/redis-rb/blob/master/lib/redis/connection/ruby.rb
It seems that we are not ready to use the feature yet.
https://github.com/redis/redis-rb/blob/4e76b035a98ce2c7bd7666a1553fc4394279ca83/lib/redis/connection/hiredis.rb#L12-L29
@supercaracal In master branch that line has been removed https://github.com/redis/redis-rb/commit/86df222e80e813127592d9bc9e0bc463a3d11a0d because hiredis now supports ssl. But redis-rb still not working with ssl when using hiredis driver.
@razasayed hiredis supports SSL in versions > 1.0 it seems https://github.com/redis/hiredis/blob/master/CHANGELOG.md#100---2020-08-03
To be clear, hiredis supports SSL, but hiredis-rb does NOT yet support this. https://github.com/redis/redis-rb/pull/1077 should be reverted.
See the ongoing work in https://github.com/redis/hiredis-rb/issues/58#issuecomment-1210983319.
5.0 now rely on redis-client which does have an hiredis driver with SSL support. So closing.