Sha256: bb693e5f39f5d0376251f1ba40d7d2eb1c53755e79d16069ab762c96aa282530

Contents?: true

Size: 790 Bytes

Versions: 24

Compression:

Stored size: 790 Bytes

Contents

require "net/http"

# create a path to the file "C:\%HOME%\cacert.pem"
cacert_file = File.join(Dir.home, "cacert.pem")

Net::HTTP.start("curl.haxx.se") do |http|
  resp = http.get("/ca/cacert.pem")
  if resp.code == "200"
    File.open(cacert_file, "wb") { |file| file.write(resp.body) }
    puts "\n\nA bundle of certificate authorities has been installed to"
    puts "C:\\%HOME%\\cacert.pem\n"
    puts "* Please set SSL_CERT_FILE in your current command prompt session with:"
    puts " set SSL_CERT_FILE=C:\\Dir.home\\cacert.pem"
    puts "* To make this a permanent setting, add it to Environment Variables"
    puts " under Control Panel -> Advanced -> Environment Variables"
  else
    abort "\n\n>>>> A cacert.pem bundle could not be downloaded."
  end
end
system "cmd /k set.bat"

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
oddb2xml-2.9.5 tools/win_fetch_cacerts.rb
oddb2xml-2.9.4 tools/win_fetch_cacerts.rb
oddb2xml-2.9.3 tools/win_fetch_cacerts.rb
oddb2xml-2.9.2 tools/win_fetch_cacerts.rb
oddb2xml-2.9.1 tools/win_fetch_cacerts.rb
oddb2xml-2.9.0 tools/win_fetch_cacerts.rb
oddb2xml-2.8.9 tools/win_fetch_cacerts.rb
oddb2xml-2.8.8 tools/win_fetch_cacerts.rb
oddb2xml-2.8.7 tools/win_fetch_cacerts.rb
oddb2xml-2.8.6 tools/win_fetch_cacerts.rb
oddb2xml-2.8.5 tools/win_fetch_cacerts.rb
oddb2xml-2.8.4 tools/win_fetch_cacerts.rb
oddb2xml-2.8.3 tools/win_fetch_cacerts.rb
oddb2xml-2.8.2 tools/win_fetch_cacerts.rb
oddb2xml-2.8.1 tools/win_fetch_cacerts.rb
oddb2xml-2.8.0 tools/win_fetch_cacerts.rb
oddb2xml-2.7.9 tools/win_fetch_cacerts.rb
oddb2xml-2.7.8 tools/win_fetch_cacerts.rb
oddb2xml-2.7.7 tools/win_fetch_cacerts.rb
oddb2xml-2.7.6 tools/win_fetch_cacerts.rb