class method
OpenSSL::Config.parse_config
(::IO io) -> ::Hash[::String, ::Hash[::String, ::String]]
Config.parse_config(io) → hash
ext/openssl/ossl_config.c
View on GitHub ↗
static VALUE
config_s_parse_config(VALUE klass, VALUE io)
{
VALUE obj, sections, ret;
long i;
obj = config_s_parse(klass, io);
sections = config_get_sections(obj);
ret = rb_hash_new();
for (i = 0; i < RARRAY_LEN(sections); i++) {
VALUE section = rb_ary_entry(sections, i);
rb_hash_aset(ret, section, config_get_section(obj, section));
}
return ret;
}
Parses the configuration data read from io and returns the whole content as a Hash.