File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ def self.connect(config)
15
15
16
16
if config [ :scheme ] == "unix"
17
17
connection . connect_unix ( config [ :path ] , connect_timeout )
18
+ elsif config [ :scheme ] == "rediss" || config [ :ssl ]
19
+ raise NotImplementedError , "SSL not supported by hiredis driver"
18
20
else
19
21
connection . connect ( config [ :host ] , config [ :port ] , connect_timeout )
20
22
end
Original file line number Diff line number Diff line change @@ -46,6 +46,17 @@ def test_ssl_blocking
46
46
end
47
47
end
48
48
49
+ driver ( :hiredis , :synchrony ) do
50
+ def test_ssl_not_implemented_exception
51
+ assert_raises ( NotImplementedError ) do
52
+ RedisMock . start ( { ping : proc { "+PONG" } } , ssl_server_opts ( "trusted" ) ) do |port |
53
+ redis = Redis . new ( port : port , ssl : true , ssl_params : { ca_file : ssl_ca_file } )
54
+ redis . ping
55
+ end
56
+ end
57
+ end
58
+ end
59
+
49
60
private
50
61
51
62
def ssl_server_opts ( prefix )
You can’t perform that action at this time.
0 commit comments