Skip to content

Commit c9efbe5

Browse files
Remove bundled root certificates
1 parent d7315e3 commit c9efbe5

5 files changed

Lines changed: 3 additions & 3541 deletions

File tree

Rakefile

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,3 @@ task default: %i[test rubocop]
77
Rake::TestTask.new do |t|
88
t.pattern = "./test/**/*_test.rb"
99
end
10-
11-
desc "Update bundled certs"
12-
task :update_certs do
13-
require "net/http"
14-
require "uri"
15-
16-
fetch_file "https://curl.se/ca/cacert.pem",
17-
File.expand_path("lib/data/ca-certificates.crt", __dir__)
18-
end
19-
20-
#
21-
# helpers
22-
#
23-
24-
def fetch_file(uri, dest)
25-
File.open(dest, "w") do |file|
26-
resp = Net::HTTP.get_response(URI.parse(uri))
27-
unless resp.code.to_i == 200
28-
abort("bad response when fetching: #{uri}\n" \
29-
"Status #{resp.code}: #{resp.body}")
30-
end
31-
file.write(resp.body)
32-
puts "Successfully fetched: #{uri}"
33-
end
34-
end

0 commit comments

Comments
 (0)