aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/vtls/nss.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index 16b9124f1..1dd56badb 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -1918,11 +1918,9 @@ int Curl_nss_random(struct SessionHandle *data,
if(data)
Curl_nss_seed(data); /* Initiate the seed if not already done */
- if(SECSuccess != PK11_GenerateRandom(entropy, curlx_uztosi(length))) {
- /* no way to signal a failure from here, we have to abort */
- failf(data, "PK11_GenerateRandom() failed, calling abort()...");
- abort();
- }
+ if(SECSuccess != PK11_GenerateRandom(entropy, curlx_uztosi(length)))
+ /* signal a failure */
+ return -1;
return 0;
}