err:
if (errstr) {
- /* we cannot use bio_err here */
- fprintf(stderr,
- "openssl (lock_dbg_cb): %s (mode=%d, type=%d) at %s:%d\n",
- errstr, mode, type, file, line);
+ BIO_printf(bio_err,
+ "openssl (lock_dbg_cb): %s (mode=%d, type=%d) at %s:%d\n",
+ errstr, mode, type, file, line);
}
}
arg.argv = NULL;
arg.size = 0;
+ /* Set up some of the environment. */
+ default_config_file = make_config_name();
+ bio_in = dup_bio_in();
+ bio_out = dup_bio_out();
+ bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
+
#if defined( OPENSSL_SYS_VMS)
copied_argv = argv = copy_argv(&argc, argv);
#endif
#ifdef OPENSSL_FIPS
if (!FIPS_mode_set(1)) {
ERR_load_crypto_strings();
- ERR_print_errors(BIO_new_fp(stderr, BIO_NOCLOSE));
- EXIT(1);
+ ERR_print_errors(bio_err);
+ return 1;
}
#else
- fprintf(stderr, "FIPS mode not supported.\n");
- EXIT(1);
+ BIO_printf(bio_err, "FIPS mode not supported.\n");
+ return 1;
#endif
}
prog = prog_init();
pname = opt_progname(argv[0]);
- /* Lets load up our environment a little */
- default_config_file = make_config_name();
- bio_in = dup_bio_in();
- bio_out = dup_bio_out();
- bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
-
/* first check the program name */
f.name = pname;
fp = lh_FUNCTION_retrieve(prog, &f);