diff --git a/CHANGES b/CHANGES index 765d2680bd..fd5de9da4f 100644 --- a/CHANGES +++ b/CHANGES @@ -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] diff --git a/lib/dns/openssl_link.c b/lib/dns/openssl_link.c index 04999b0b5c..799e6eea63 100644 --- a/lib/dns/openssl_link.c +++ b/lib/dns/openssl_link.c @@ -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