File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ def self.connect(config)
13
13
14
14
if config [ :scheme ] == "unix"
15
15
connection . connect_unix ( config [ :path ] , connect_timeout )
16
+ elsif config [ :scheme ] == "rediss" || config [ :ssl ]
17
+ raise NotImplementedError , "SSL not supported by hiredis driver"
16
18
else
17
19
connection . connect ( config [ :host ] , config [ :port ] , connect_timeout )
18
20
end
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ class Synchrony
68
68
def self . connect ( config )
69
69
if config [ :scheme ] == "unix"
70
70
conn = EventMachine . connect_unix_domain ( config [ :path ] , RedisClient )
71
+ elsif config [ :scheme ] == "rediss" || config [ :ssl ]
72
+ raise NotImplementedError , "SSL not supported by synchrony driver"
71
73
else
72
74
conn = EventMachine . connect ( config [ :host ] , config [ :port ] , RedisClient ) do |c |
73
75
c . pending_connect_timeout = [ config [ :connect_timeout ] , 0.1 ] . max
Original file line number Diff line number Diff line change @@ -27,6 +27,19 @@ def test_unverified_ssl_connection
27
27
28
28
end
29
29
30
+ driver ( :hiredis , :synchrony ) do
31
+
32
+ def test_ssl_not_implemented_exception
33
+ assert_raise ( NotImplementedError ) do
34
+ RedisMock . start ( { :ping => proc { "+PONG" } } , ssl_server_opts ( "trusted" ) ) do |port |
35
+ redis = Redis . new ( :port => port , :ssl => true , :ssl_params => { :ca_file => ssl_ca_file } )
36
+ redis . ping
37
+ end
38
+ end
39
+ end
40
+
41
+ end
42
+
30
43
private
31
44
32
45
def ssl_server_opts ( prefix )
You can’t perform that action at this time.
0 commit comments