gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 75/173: openssl: Fix random generation


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 75/173: openssl: Fix random generation
Date: Fri, 24 Feb 2017 14:01:37 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.53.1
in repository gnurl.

commit afd1564215970f75439ac4e83a7974efa8c739c6
Author: Jay Satiro <address@hidden>
AuthorDate: Tue Jan 17 02:53:29 2017 -0500

    openssl: Fix random generation
    
    - Fix logic error in Curl_ossl_random.
    
    Broken a few days ago in 807698d.
---
 lib/vtls/openssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 63fad71fc..48a4c0b02 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -3286,7 +3286,7 @@ CURLcode Curl_ossl_random(struct Curl_easy *data, 
unsigned char *entropy,
   }
   /* RAND_bytes() returns 1 on success, 0 otherwise.  */
   rc = RAND_bytes(entropy, curlx_uztosi(length));
-  return rc?CURLE_FAILED_INIT:CURLE_OK;
+  return (rc == 1 ? CURLE_OK : CURLE_FAILED_INIT);
 }
 
 void Curl_ossl_md5sum(unsigned char *tmp, /* input */

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]