mbedtls: bail out if rng init fails

There was a failf() call but no actual error return.

Closes #8796
This commit is contained in:
Harry Sintonen 2022-05-05 02:23:16 +03:00 committed by Daniel Stenberg
parent b5b86856a9
commit d7fb9ab7ce
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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 */