- /* Lets load up our environment a little */
- bio_in = dup_bio_in();
- bio_out = dup_bio_out();
- bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
-
- /* Determine and load the config file. */
- default_config_file = getenv("OPENSSL_CONF");
- if (default_config_file == NULL)
- default_config_file = getenv("SSLEAY_CONF");
- if (default_config_file == NULL)
- default_config_file = to_free = make_config_name();
- if (!load_config(NULL))
- goto end;
- config = NCONF_new(NULL);
- i = NCONF_load(config, default_config_file, &errline);
- if (i == 0) {
- if (ERR_GET_REASON(ERR_peek_last_error())
- == CONF_R_NO_SUCH_FILE) {
- BIO_printf(bio_err,
- "%s: WARNING: can't open config file: %s\n",
- pname, default_config_file);
- ERR_clear_error();
- NCONF_free(config);
- config = NULL;
- } else {
- ERR_print_errors(bio_err);
- NCONF_free(config);
- exit(1);
- }
- }
-