lib/httpi/adapter/excon.rb in httpi-2.4.1 vs lib/httpi/adapter/excon.rb in httpi-2.4.2

- old
+ new

@@ -59,14 +59,17 @@ opts[:connect_timeout] = @request.open_timeout if @request.open_timeout opts[:read_timeout] = @request.read_timeout if @request.read_timeout opts[:response_block] = @request.on_body if @request.on_body opts[:proxy] = @request.proxy if @request.proxy - if ssl.verify_mode == :peer + case ssl.verify_mode + when :peer opts[:ssl_verify_peer] = true opts[:ssl_ca_file] = ssl.ca_cert_file if ssl.ca_cert_file - opts[:client_cert] = ssl.cert if ssl.cert - opts[:client_key] = ssl.cert_key if ssl.cert_key + opts[:certificate] = ssl.cert.to_pem if ssl.cert + opts[:private_key] = ssl.cert_key.to_pem if ssl.cert_key + when :none + opts[:ssl_verify_peer] = false end opts[:ssl_version] = ssl.ssl_version if ssl.ssl_version opts