hiredis-rb icon indicating copy to clipboard operation
hiredis-rb copied to clipboard

Add possibility to establish SSL connection with SSL_VERIFY_NONE

Open mtuleika-appcast opened this issue 3 years ago • 4 comments

This PR adds possibility to establish SSL connection to Redis with SSL_VERIFY_NONE(in my case to ElastiCache).

What was done:

  • hiredis submodule was bumped to version 1.0.0
  • C extension in hiredis-rb was extended to support SSL connection without certification
require 'hiredis'

conn = Hiredis::Connection.new
conn.connect_ssl('<host>', 6379)

conn.write %w[AUTH <password>]
puts conn.read
conn.write %w[SET speed awesome]
puts conn.read
conn.write %w[GET speed]
puts conn.read

mtuleika-appcast avatar Jun 01 '21 11:06 mtuleika-appcast

I think first PR #69 can be merged and then the ssl support added.

ssinghi avatar Sep 26 '21 05:09 ssinghi

Well PR #69 has been merged...

milieu avatar Feb 16 '22 04:02 milieu

hey @ssinghi and team, would love for this to be merged if/when possible !

ayoul3 avatar Mar 23 '22 13:03 ayoul3

@stanhu I also saw https://github.com/michael-grunder/hiredis-rb/commits/ssl-support which is also an attempt to add SSL support.

I saw it has some code to conditionally link OpenSSL: https://github.com/michael-grunder/hiredis-rb/commit/a9897ec9f97cced27e0ba3d4700d7fe638635161#diff-573a6b1ffeebb872ab4255105affc087786e9e64b583ebcf28bca619c0a1227aR48-R49

engwan avatar Aug 06 '22 03:08 engwan

@stanhu @ssinghi @mtuleika-appcast doesn't work on ruby projects anymore, maybe someone can continue this PR

YegorZdanovich avatar Dec 02 '22 14:12 YegorZdanovich