Class: Skylight::Util::SSL Private

Inherits:
Object show all
Defined in:
lib/skylight/util/ssl.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

DEFAULT_CA_FILE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

File.expand_path("../data/cacert.pem", __dir__)

Class Method Summary collapse

Class Method Details

.ca_cert_file?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


21
22
23
# File 'lib/skylight/util/ssl.rb', line 21

def self.ca_cert_file?
  !!@ca_cert_file
end

.ca_cert_file_or_defaultObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



25
26
27
# File 'lib/skylight/util/ssl.rb', line 25

def self.ca_cert_file_or_default
  @ca_cert_file || DEFAULT_CA_FILE
end

.detect_ca_cert_file!Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
13
14
15
16
17
# File 'lib/skylight/util/ssl.rb', line 8

def self.detect_ca_cert_file!
  return nil if ENV["SKYLIGHT_FORCE_OWN_CERTS"]

  @ca_cert_file = false
  if defined?(OpenSSL::X509::DEFAULT_CERT_FILE)
    f = OpenSSL::X509::DEFAULT_CERT_FILE

    @ca_cert_file = f if f && File.exist?(f)
  end
end