hmac_drbg: fix default value of the prediction resistance in ctx

After changing the possible prediction resistance values to have more
hamming distance between them, 0 (default initialization value) no
longer meant no prediction resistance.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2020-07-18 07:09:04 -04:00
parent 6bc37fa4e2
commit f6265441b0
No known key found for this signature in database
GPG key ID: 89A90840DC388527

View file

@ -62,6 +62,7 @@ void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx )
{
memset( ctx, 0, sizeof( mbedtls_hmac_drbg_context ) );
ctx->prediction_resistance = MBEDTLS_HMAC_DRBG_PR_OFF;
#if defined(MBEDTLS_THREADING_C)
mbedtls_mutex_init( &ctx->mutex );
#endif