mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-05-12 18:32:18 +00:00
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:
parent
6bc37fa4e2
commit
f6265441b0
|
@ -62,6 +62,7 @@ void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx )
|
||||||
{
|
{
|
||||||
memset( ctx, 0, sizeof( mbedtls_hmac_drbg_context ) );
|
memset( ctx, 0, sizeof( mbedtls_hmac_drbg_context ) );
|
||||||
|
|
||||||
|
ctx->prediction_resistance = MBEDTLS_HMAC_DRBG_PR_OFF;
|
||||||
#if defined(MBEDTLS_THREADING_C)
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
mbedtls_mutex_init( &ctx->mutex );
|
mbedtls_mutex_init( &ctx->mutex );
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue