To load the capi engine dynamically, the following code is used:
EVP_PKEY *key = NULL;
ENGINE_load_builtin_engines();
ENGINE *engine = ENGINE_by_id("dynamic");
ENGINE_ctrl_cmd_string(engine, "SO_PATH", "./capi.dll", 0);
ENGINE_ctrl_cmd_string(engine, "LOAD", NULL, 0);
ENGINE_init(engine);
While debugging I checked, ENGINE_ctrl_cmd_string(engine, "LOAD", NULL, 0)
is failing. So what could be the reason for this?
I have not build openssl for using capi
, I am using default capi.dll
that came with openssl.
Should I build the openssl again with capi enabled in openssl.cfg file, or is there something else I am doing wrong?