From c7834ecd45194dbca9762ad8fc06072b77481a29 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 23 Dec 2016 15:01:53 +0100 Subject: gnutls-random: check return code for failed random --- lib/vtls/gtls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c index 0e308cb79..282ceb229 100644 --- a/lib/vtls/gtls.c +++ b/lib/vtls/gtls.c @@ -1630,8 +1630,10 @@ int Curl_gtls_random(struct Curl_easy *data, size_t length) { #if defined(USE_GNUTLS_NETTLE) + int rc; (void)data; - gnutls_rnd(GNUTLS_RND_RANDOM, entropy, length); + rc = gnutls_rnd(GNUTLS_RND_RANDOM, entropy, length); + return rc; #elif defined(USE_GNUTLS) if(data) Curl_gtls_seed(data); /* Initiate the seed if not already done */ -- cgit v1.2.3