Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
OpenSSL::Engine.load
(?::String name) -> (true | nil)
OpenSSL::Engine.load(name = nil)
ext/openssl/ossl_engine.c
View on GitHub ↗
static VALUE
ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
{
VALUE name;
rb_scan_args(argc, argv, "01", &name);
if(NIL_P(name)){
ENGINE_load_builtin_engines();
return Qtrue;
}
StringValueCStr(name);
OSSL_ENGINE_LOAD_IF_MATCH(dynamic, DYNAMIC);
OSSL_ENGINE_LOAD_IF_MATCH(padlock, PADLOCK);
OSSL_ENGINE_LOAD_IF_MATCH(capi, CAPI);
OSSL_ENGINE_LOAD_IF_MATCH(cryptodev, CRYPTODEV);
OSSL_ENGINE_LOAD_IF_MATCH(openssl, OPENSSL);
rb_warning("no such builtin loader for `%"PRIsVALUE"'", name);
return Qnil;
}
This method loads engines. If name is nil, then all builtin engines are loaded. Otherwise, the given name, as a String, is loaded if available to your runtime, and returns true. If name is not found, then nil is returned.