mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
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:
@ -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 */
|
||||
|
||||
|
Reference in New Issue
Block a user