-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hiredis now supports SSL #58
Comments
Hi there, is there any chance that this gem is going to be updated to support SSL in the near future? |
Is there a status update on this? |
Any status on this? I really need this to be supported |
Hi all, I took a crack at adding this over in my fork, and it appears to work: Disclaimer: I've never used Ruby or the Ruby extension API, so I could be missing some obvious gotchas. There's quite a bit of arcane logic (temporary Instead of adding to the existing Quick example: require 'hiredis'
conn = Hiredis::Connection.new
conn.connect("127.0.0.1", 6390)
# Prototype: secure(ca, [cert, key, servername])
conn.secure "/path/to/ca", "/path/to/cert", "/path/to/key", "servername"
conn.write ["SET", "foo", "bar"]
conn.write ["RPUSH", "list", "a", "b", "c", "d", "e"]
conn.write ["GET", "foo"]
conn.write ["LRANGE", "list", 0, -1]
puts conn.read
puts conn.read
puts conn.read
puts conn.read Edit: If you want to test it out without # Make sure you're on the ssl-support branch
hiredis-rb $ USE_SSL=1 rake compile
hiredis-rb $ ruby -Ilib your_ssh_test.rb Edit2: I reworked the C function and got a Ruby fallback working although I'm sure it will need to rescue Cheers! |
If people are actually interested in this feature, I'm happy to formalize the API (at least with respect to the C extension). I don't know Ruby, so I have no idea what the "Rubyist" way to do things is. |
Yes please! I'm happy to help with the ruby side of things. |
Just popping in to note that hiredis recently cut a 1.0 release with SSL support (previously support was merged but unreleased). |
@michael-grunder possible 1.0 update with ssl support? |
👍 |
Some work towards this: |
It seems redis-client already supports SSL with hiredis: https://github.com/redis-rb/redis-client/blob/master/hiredis-client/ext/redis_client/hiredis/hiredis_connection.c I wonder if we should just deprecate this library in favor of that. |
@michael-grunder @stanhu Any insight on what is the ETA for v1 release that supports ssl? |
I can rebase the changes in my fork and get them merged but the underlying issue is just that I have basically no knowledge of ruby, so am not certain about the correctness of my changes. I suppose I can get them merged and then people can test them before an actual release. |
@michael-grunder Why not we have some rc release for testing. I believe many of us will certainly try to provide feedback if necessary. I think we also need to reopen #87 and merge it For those who uses Rails, I assume we can't simply swap out |
I'm waiting for redis/hiredis#1085 to be merged. I also stopped working on #87 because I think we should deprecate this gem and use redis-client (https://github.com/redis-rb/redis-client/blob/master/hiredis-client/ext/redis_client/hiredis/hiredis_connection.c), which fixes all the issues I ran into with this gem:
Plus, Sidekiq 7 already natively supports it, and redis-rb is going to start using it. |
Sidekiq supports it since v6.5 as beta feature but Actioncable of Rails still does not support the adapter out of the box So, it would be awhile before we can deprecate this gem 🙊 |
Ok, I may continue working on #87 since hiredis-client also mandates Redis 6, which may be an issue for some legacy clients. I'd like to see redis/hiredis#1085 merged and released, though. |
I should also mentioned that #87 requires a change in |
I'm currently working on Feel free to work on all that, but I figured I'd give you a heads up. Ref: redis/redis-rb#1120 |
redis/hiredis#645 - not sure if any changes need to be made here
The text was updated successfully, but these errors were encountered: