Fix error discrepancy.
We can't rename ssleay_rand_bytes to md_rand_bytes_lock as this will cause an error code discrepancy. Instead keep ssleay_rand_bytes and add an extra parameter: since ssleay_rand_bytes is not part of the public API this wont cause any binary compatibility issues. Reviewed-by: Kurt Roeckx <kurt@openssl.org >
This commit is contained in:
@@ -200,7 +200,7 @@ static size_t drbg_get_entropy(DRBG_CTX *ctx, unsigned char **pout,
|
||||
*pout = OPENSSL_malloc(min_len);
|
||||
if (!*pout)
|
||||
return 0;
|
||||
if (md_rand_bytes_lock(*pout, min_len, 0, 0) <= 0)
|
||||
if (ssleay_rand_bytes(*pout, min_len, 0, 0) <= 0)
|
||||
{
|
||||
OPENSSL_free(*pout);
|
||||
*pout = NULL;
|
||||
|
||||
Reference in New Issue
Block a user