Skip to content

Commit 3c98118

Browse files
authored
backport: set cert store explicitly (#17)
GitHub: fix GH-12
1 parent 3db545c commit 3c98118

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/remote_input/downloader.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ def download(output_path, &block)
159159
http = Net::HTTP.new(url.hostname, url.port)
160160
# http.set_debug_output($stderr)
161161
http.use_ssl = (url.scheme == "https")
162+
if http.use_ssl?
163+
store = OpenSSL::X509::Store.new
164+
store.set_default_paths
165+
http.cert_store = store
166+
end
162167
http.start do
163168
path = url.path
164169
path += "?#{url.query}" if url.query

0 commit comments

Comments
 (0)