66 static char *skip_dot(
char *name)
69 p = strchr(name,
'.');
77 static int int_engine_init(
ENGINE *
e)
81 if (!initialized_engines)
83 if (!initialized_engines || !
sk_ENGINE_push(initialized_engines, e))
92 static int int_engine_configure(
char *name,
char *value,
const CONF *cnf)
99 char *ctrlname, *ctrlvalue;
103 name = skip_dot(name);
104 #ifdef ENGINE_CONF_DEBUG
105 fprintf(stderr,
"Configuring engine %s\n", name);
108 ecmds = NCONF_get_section(cnf, value);
119 ctrlname = skip_dot(ecmd->
name);
120 ctrlvalue = ecmd->
value;
121 #ifdef ENGINE_CONF_DEBUG
122 fprintf(stderr,
"ENGINE conf: doing ctrl(%s,%s)\n", ctrlname, ctrlvalue);
128 if (!strcmp(ctrlname,
"engine_id"))
130 else if (!strcmp(ctrlname,
"soft_load"))
133 else if (!strcmp(ctrlname,
"dynamic_path"))
165 if (!strcmp(ctrlvalue,
"EMPTY"))
167 if (!strcmp(ctrlname,
"init"))
173 if (!int_engine_init(e))
176 else if (do_init != 0)
182 else if (!strcmp(ctrlname,
"default_algorithms"))
188 ctrlname, ctrlvalue, 0))
195 if (e && (do_init == -1) && !int_engine_init(e))
207 ", name=", ecmd->
name,
208 ", value=", ecmd->
value);
221 #ifdef ENGINE_CONF_DEBUG
222 fprintf(stderr,
"Called engine module: name %s, value %s\n",
237 if (!int_engine_configure(cval->
name, cval->
value, cnf))
250 initialized_engines = NULL;
257 int_engine_module_init,
258 int_engine_module_finish);