mirror of
https://github.com/curl/curl.git
synced 2025-03-19 15:40:42 +08: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…
x
Reference in New Issue
Block a user