module Cacert

Constants

VERSION

Public Class Methods

pem() click to toggle source

Returns the path of the embedded cacert.pem SSL certificates file.

# File lib/cacert.rb, line 10
def self.pem
  File.join(share_dir, 'cacert.pem')
end
set_in_env() click to toggle source

Sets the SSL_CERT_FILE environment variable to the location of the cacert.pem file.

# File lib/cacert.rb, line 15
def self.set_in_env
  ENV['SSL_CERT_FILE'] = self.pem.to_s
end
share_dir() click to toggle source

Returns the directory containing the cacert.pem file.

# File lib/cacert.rb, line 5
def self.share_dir
  File.expand_path('../share', __dir__)
end
source() click to toggle source

The link which cacert.pem can be downloaded from.

# File lib/cacert.rb, line 20
def self.source
  "https://curl.haxx.se/ca/cacert.pem"
end