1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

Make PK EC sign/verify actually restartable

This commit is contained in:
Manuel Pégourié-Gonnard
2017-05-09 10:42:40 +02:00
parent c4ee9acb7b
commit 1f596064bc
6 changed files with 242 additions and 5 deletions

View File

@ -779,6 +779,9 @@ void mbedtls_ecdsa_restart_init( mbedtls_ecdsa_restart_ctx *ctx )
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
ctx->det = NULL;
#endif
#if defined(MBEDTLS_PK_C)
ctx->ecdsa = NULL;
#endif
}
/*
@ -801,6 +804,12 @@ void mbedtls_ecdsa_restart_free( mbedtls_ecdsa_restart_ctx *ctx )
mbedtls_free( ctx->det );
ctx->det = NULL;
#endif
#if defined(MBEDTLS_PK_C)
mbedtls_ecdsa_free( ctx->ecdsa );
mbedtls_free( ctx->ecdsa );
ctx->ecdsa = NULL;
#endif
}
#endif /* MBEDTLS_ECP_RESTARTABLE */