- if (template != NULL) {
- long errline = -1;
-
- if (verbose)
- BIO_printf(bio_err, "Using configuration from %s\n", template);
- req_conf = NCONF_new(NULL);
- i = NCONF_load(req_conf, template, &errline);
- if (i == 0) {
- BIO_printf(bio_err, "error on line %ld of %s\n", errline,
- template);
- goto end;
- }
- } else {
- req_conf = config;
-
- if (req_conf == NULL) {
- BIO_printf(bio_err, "Unable to load config info from %s\n",
- default_config_file);
- if (newreq)
- goto end;
- } else if (verbose)
- BIO_printf(bio_err, "Using configuration from %s\n",
- default_config_file);
- }
+ if (verbose)
+ BIO_printf(bio_err, "Using configuration from %s\n", template);
+ req_conf = app_load_config(template);
+ if (!app_load_modules(req_conf))
+ goto end;