Module: OpenSSL::X509
- Defined in:
- lib/falcon/extensions/openssl.rb
Constant Summary collapse
- CERTIFICATE_PATTERN =
/-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m
Class Method Summary collapse
-
.load_certificates(path) ⇒ Object
An extension to load an array of certificates from a file at the given path.
Class Method Details
.load_certificates(path) ⇒ Object
An extension to load an array of certificates from a file at the given path.
29 30 31 32 33 |
# File 'lib/falcon/extensions/openssl.rb', line 29 def self.load_certificates(path) File.read(path).scan(CERTIFICATE_PATTERN).collect do |text| Certificate.new(text) end end |