-
- if (file == NULL || !RAND_load_file(file, -1)) {
- if (RAND_status() == 0) {
- if (!dont_warn) {
- BIO_printf(bio_err, "unable to load 'random state'\n");
- BIO_printf(bio_err,
- "This means that the random number generator has not been seeded\n");
- BIO_printf(bio_err, "with much random data.\n");
- if (consider_randfile) { /* explanation does not apply when a
- * file is explicitly named */
- BIO_printf(bio_err,
- "Consider setting the RANDFILE environment variable to point at a file that\n");
- BIO_printf(bio_err,
- "'random' data can be kept in (the file will be overwritten).\n");
- }
- }
- return 0;
- }
+ if (RAND_load_file(randfile, -1) < 0) {
+ BIO_printf(bio_err, "Can't load %s into RNG\n", randfile);
+ ERR_print_errors(bio_err);
+ return;