End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
OpenSSL::Config.new
new(filename = nil)
ext/openssl/lib/openssl/config.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/ext/openssl/lib/openssl/config.rb, line 264
def initialize(filename = nil)
@data = {}
if filename
File.open(filename.to_s) do |file|
Config.parse_config(file).each do |section, hash|
set_section(section, hash)
end
end
end
end
Creates an instance of OpenSSL’s configuration class.
This can be used in contexts like OpenSSL::X509::ExtensionFactory.config=
If the optional filename parameter is provided, then it is read in and parsed via parse_config.
This can raise IO exceptions based on the access, or availability of the file. A ConfigError exception may be raised depending on the validity of the data being configured.