1 require 'typhoeus/easy_factory'
5 alias_method :get_orig, :get
9 if ENV['CURL_CA_BUNDLE']
10 Ethon::Curl.set_option(:cainfo, ENV['CURL_CA_BUNDLE'], easy.handle)
12 ["#{ENV['HOME']}/.config/osdn/ca-certificates.crt"] + %w(
13 /usr/local/share/curl/curl-ca-bundle.crt
14 /usr/share/curl/ca-bundle.crt
15 /etc/ssl/certs/ca-certificates.crt
16 /etc/ssl/certs/ca-certificates.pem
17 /etc/pki/tls/certs/ca-bundle.crt
18 /etc/pki/tls/certs/ca-bundle.pem
19 /etc/ssl/ca-bundle.pem
21 next unless File.exists? ca
22 Ethon::Curl.set_option(:cainfo, ca, easy.handle)
26 if OSDN::CLI._show_progress
27 Ethon::Curl.set_option(:noprogress, false, easy.handle)
29 Ethon::Curl.set_option(:noprogress, true, easy.handle)
32 if OSDN::CLI._rate_limit
33 Ethon::Curl.set_option(:max_send_speed_large, OSDN::CLI._rate_limit, easy.handle)
34 Ethon::Curl.set_option(:max_recv_speed_large, OSDN::CLI._rate_limit, easy.handle)