Do not start md accumulator in mbedtls_entropy_init

This change moves the calls to mbedtls_sha256_starts() and
mbedtls_sha512_starts() out of the mbedtls_entropy_init() function as
these now have return codes which need to be checked.
This commit is contained in:
Andres Amaya Garcia 2017-06-29 16:31:44 +01:00
parent a7559cb7ba
commit 95869c4934
2 changed files with 21 additions and 3 deletions

View file

@ -121,6 +121,7 @@ mbedtls_entropy_source_state;
*/
typedef struct
{
int accumulator_started;
#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR)
mbedtls_sha512_context accumulator;
#else