Class: Skylight::Util::SSL Private
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.('../../data/cacert.pem', __FILE__)
Class Method Summary collapse
- .ca_cert_dir ⇒ Object private
- .ca_cert_dir? ⇒ Boolean private
- .ca_cert_file? ⇒ Boolean private
- .ca_cert_file_or_default ⇒ Object private
- .detect_ca_cert_dir! ⇒ Object private
- .detect_ca_cert_file! ⇒ Object private
Class Method Details
.ca_cert_dir ⇒ 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.
45 46 47 |
# File 'lib/skylight/util/ssl.rb', line 45 def self.ca_cert_dir @ca_cert_dir end |
.ca_cert_dir? ⇒ 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.
37 38 39 |
# File 'lib/skylight/util/ssl.rb', line 37 def self.ca_cert_dir? !!@ca_cert_dir end |
.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.
33 34 35 |
# File 'lib/skylight/util/ssl.rb', line 33 def self.ca_cert_file? !!@ca_cert_file end |
.ca_cert_file_or_default ⇒ 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.
41 42 43 |
# File 'lib/skylight/util/ssl.rb', line 41 def self.ca_cert_file_or_default @ca_cert_file || DEFAULT_CA_FILE end |
.detect_ca_cert_dir! ⇒ 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.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/skylight/util/ssl.rb', line 19 def self.detect_ca_cert_dir! @ca_cert_dir = false if defined?(OpenSSL::X509::DEFAULT_CERT_DIR) d = OpenSSL::X509::DEFAULT_CERT_DIR if d && File.exist?(d) @ca_cert_dir = d end end 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! @ca_cert_file = false if defined?(OpenSSL::X509::DEFAULT_CERT_FILE) f = OpenSSL::X509::DEFAULT_CERT_FILE if f && File.exist?(f) @ca_cert_file = f end end end |