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:
Dr. Stephen Henson
2014-07-31 21:22:23 +01:00
parent ba5f75d53e
commit 2c3673cd3f
3 changed files with 5 additions and 11 deletions

View File

@@ -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;