mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
openssl: Fix random generation
- Fix logic error in Curl_ossl_random.
Broken a few days ago in 807698d
.
This commit is contained in:
parent
25543b8392
commit
afd1564215
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user