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>
diff --git a/library/hmac_drbg.c b/library/hmac_drbg.c
index 92d7ba4..fc7aea9 100644
--- a/library/hmac_drbg.c
+++ b/library/hmac_drbg.c
@@ -62,6 +62,7 @@
{
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