mirror of
https://github.com/curl/curl.git
synced 2024-12-15 06:40:09 +08:00
mbedtls: bail out if rng init fails
There was a failf() call but no actual error return. Closes #8796
This commit is contained in:
parent
b5b86856a9
commit
d7fb9ab7ce
@ -305,6 +305,7 @@ mbed_connect_step1(struct Curl_easy *data, struct connectdata *conn,
|
|||||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||||
failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s",
|
failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s",
|
||||||
-ret, errorbuf);
|
-ret, errorbuf);
|
||||||
|
return CURLE_FAILED_INIT;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
mbedtls_entropy_init(&backend->entropy);
|
mbedtls_entropy_init(&backend->entropy);
|
||||||
@ -316,6 +317,7 @@ mbed_connect_step1(struct Curl_easy *data, struct connectdata *conn,
|
|||||||
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
||||||
failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s",
|
failf(data, "Failed - mbedTLS: ctr_drbg_init returned (-0x%04X) %s",
|
||||||
-ret, errorbuf);
|
-ret, errorbuf);
|
||||||
|
return CURLE_FAILED_INIT;
|
||||||
}
|
}
|
||||||
#endif /* THREADING_SUPPORT */
|
#endif /* THREADING_SUPPORT */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user