"invalid hex salt value\n");
goto end;
}
- } else RAND_bytes(salt, PKCS5_SALT_LEN);
+ } else if (RAND_bytes(salt, PKCS5_SALT_LEN) <= 0) {
+ BIO_printf(bio_err,
+ "prng not seeded\n");
+ goto end;
+ }
/* If -P option then don't bother writing */
if((printkey != 2)
&& (BIO_write(wbio,magic,
BIO_printf(bio_err,"bytes written:%8ld\n",BIO_number_written(out));
}
end:
+ ERR_print_errors(bio_err);
if (strbuf != NULL) Free(strbuf);
if (buff != NULL) Free(buff);
if (in != NULL) BIO_free(in);