class RedisClient::RubyConnection
def ssl_context(ssl_params)
def ssl_context(ssl_params) params = ssl_params.dup || {} cert = params[:cert] if cert.is_a?(String) cert = File.read(cert) if File.exist?(cert) params[:cert] = OpenSSL::X509::Certificate.new(cert) end key = params[:key] if key.is_a?(String) key = File.read(key) if File.exist?(key) params[:key] = OpenSSL::PKey.read(key) end context = OpenSSL::SSL::SSLContext.new context.set_params(params) if context.verify_mode != OpenSSL::SSL::VERIFY_NONE if context.respond_to?(:verify_hostname) # Missing on JRuby context.verify_hostname end end context end