lib/yao/client.rb in yao-0.3.1 vs lib/yao/client.rb in yao-0.3.2

- old
+ new

@@ -63,9 +63,18 @@ end def client_options opt = {} opt.merge!({ request: { timeout: Yao.config.timeout }}) if Yao.config.timeout + if Yao.config.client_cert && Yao.config.client_key + require 'openssl' + cert = OpenSSL::X509::Certificate.new(File.read(Yao.config.client_cert)) + key = OpenSSL::PKey.read(File.read(Yao.config.client_key)) + opt.merge!(ssl: { + client_cert: cert, + client_key: key, + }) + end opt end end Yao.config.param :auth_url, nil do |endpoint|