68 #define DSO_mod_init_name "OPENSSL_init"
69 #define DSO_mod_finish_name "OPENSSL_finish"
112 static int module_run(
const CONF *cnf,
char *name,
char *value,
113 unsigned long flags);
117 static int module_init(
CONF_MODULE *pmod,
char *name,
char *value,
119 static CONF_MODULE *module_load_dso(
const CONF *cnf,
char *name,
char *value,
120 unsigned long flags);
129 char *vsection = NULL;
148 values = NCONF_get_section(cnf, vsection);
156 ret = module_run(cnf, vl->
name, vl->
value, flags);
176 if (filename == NULL)
183 file = (
char *)filename;
199 if (filename == NULL)
206 static int module_run(
const CONF *cnf,
char *name,
char *value,
212 md = module_find(name);
216 md = module_load_dso(cnf, name, value, flags);
228 ret = module_init(md, name, value, cnf);
245 static CONF_MODULE *module_load_dso(
const CONF *cnf,
char *name,
char *value,
261 dso =
DSO_load(NULL, path, NULL, 0);
275 md = module_add(dso, name, ifunc, ffunc);
295 if (supported_modules == NULL)
297 if (supported_modules == NULL)
328 p = strrchr(name,
'.');
333 nchar = strlen(name);
338 if (!strncmp(tmod->
name, name, nchar))
347 static int module_init(
CONF_MODULE *pmod,
char *name,
char *value,
370 ret = pmod->
init(imod, cnf);
377 if (initialized_modules == NULL)
380 if (!initialized_modules)
400 if (pmod->
finish && init_called)
432 if (((md->
links > 0) || !md->
dso) && !all)
441 supported_modules = NULL;
465 initialized_modules = NULL;
485 if (module_add(NULL, name, ifunc, ffunc))
551 file = getenv(
"OPENSSL_CONF");
556 #ifndef OPENSSL_SYS_VMS
566 #ifndef OPENSSL_SYS_VMS
581 int (*list_cb)(
const char *elem,
int len,
void *usr),
void *
arg)
584 const char *lstart, *tmpend, *
p;
597 while(*lstart && isspace((
unsigned char)*lstart))
600 p = strchr(lstart, sep);
601 if (p == lstart || !*lstart)
602 ret = list_cb(NULL, 0, arg);
608 tmpend = lstart + strlen(lstart) - 1;
611 while(isspace((
unsigned char)*tmpend))
614 ret = list_cb(lstart, tmpend - lstart + 1, arg);