Sha256: b1d9409a8d9a3598b34ff44ab7bbb29a6e66e4150628d19e4414aad11400de02

Contents?: true

Size: 786 Bytes

Versions: 152

Compression:

Stored size: 786 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"
    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

152 entries across 152 versions & 1 rubygems

Version Path
oddb2xml-2.7.1 tools/win_fetch_cacerts.rb
oddb2xml-2.7.0 tools/win_fetch_cacerts.rb
oddb2xml-2.6.9 tools/win_fetch_cacerts.rb
oddb2xml-2.6.8 tools/win_fetch_cacerts.rb
oddb2xml-2.6.7 tools/win_fetch_cacerts.rb
oddb2xml-2.6.6 tools/win_fetch_cacerts.rb
oddb2xml-2.6.5 tools/win_fetch_cacerts.rb
oddb2xml-2.6.4 tools/win_fetch_cacerts.rb
oddb2xml-2.6.3 tools/win_fetch_cacerts.rb
oddb2xml-2.6.2 tools/win_fetch_cacerts.rb
oddb2xml-2.6.1 tools/win_fetch_cacerts.rb
oddb2xml-2.6.0 tools/win_fetch_cacerts.rb
oddb2xml-2.5.9 tools/win_fetch_cacerts.rb
oddb2xml-2.5.8 tools/win_fetch_cacerts.rb
oddb2xml-2.5.7 tools/win_fetch_cacerts.rb
oddb2xml-2.5.6 tools/win_fetch_cacerts.rb
oddb2xml-2.5.5 tools/win_fetch_cacerts.rb
oddb2xml-2.5.4 tools/win_fetch_cacerts.rb
oddb2xml-2.5.3 tools/win_fetch_cacerts.rb
oddb2xml-2.5.2 tools/win_fetch_cacerts.rb