2957. [bug] entropy_get() and entropy_getpseudo() failed to match

the API for RAND_bytes() and RAND_pseudo_bytes()
                        respectively. [RT #21962]
This commit is contained in:
Mark Andrews
2010-09-15 03:06:15 +00:00
parent 2df9c63cad
commit 70ba55161b
2 changed files with 7 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
2957. [bug] entropy_get() and entropy_getpseudo() failed to match
the API for RAND_bytes() and RAND_pseudo_bytes()
respectively. [RT #21962]
2956. [port] Enable atomic operations on the PowerPC64. [RT #21899]
2955. [func] Provide more detail in the recursing log. [RT #22043]

View File

@@ -31,7 +31,7 @@
/*
* Principal Author: Brian Wellington
* $Id: openssl_link.c,v 1.27 2009/10/05 17:30:49 fdupont Exp $
* $Id: openssl_link.c,v 1.28 2010/09/15 03:06:15 marka Exp $
*/
#ifdef OPENSSL
@@ -79,7 +79,7 @@ entropy_get(unsigned char *buf, int num) {
if (num < 0)
return (-1);
result = dst__entropy_getdata(buf, (unsigned int) num, ISC_FALSE);
return (result == ISC_R_SUCCESS ? num : -1);
return (result == ISC_R_SUCCESS ? 1 : -1);
}
static int
@@ -93,7 +93,7 @@ entropy_getpseudo(unsigned char *buf, int num) {
if (num < 0)
return (-1);
result = dst__entropy_getdata(buf, (unsigned int) num, ISC_TRUE);
return (result == ISC_R_SUCCESS ? num : -1);
return (result == ISC_R_SUCCESS ? 1 : -1);
}
static void