Keep PK layer context in the PK layer
Previously we kept the ecdsa context created by the PK layer for ECDSA operations on ECKEY in the ecdsa_restart_ctx structure, which was wrong, and caused by the fact that we didn't have a proper handling of restart sub-contexts in the PK layer.
This commit is contained in:
parent
0bbc66cc76
commit
fe6877034d
3 changed files with 82 additions and 104 deletions
|
@ -780,9 +780,6 @@ 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
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -805,12 +802,6 @@ 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 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue