Skip to content

Commit be13a25

Browse files
authored
downloader: set cert store explicitly (#248)
We need to do this to use system certifications on Arch Linux.
1 parent 0c778d3 commit be13a25

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/datasets/downloader.rb

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

0 commit comments

Comments
 (0)