Skip to content

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)

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.

See also .get_line .parse .get_definition .parse_config also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1