mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
Dynamically allocate/free restart subcontext in PK
This commit is contained in:
@@ -135,7 +135,8 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
mbedtls_ecdsa_restart_ctx ecdsa; /* temporary */
|
||||
const mbedtls_pk_info_t * pk_info; /**< Public key informations */
|
||||
void * rs_ctx; /**< Underlying restart context */
|
||||
} mbedtls_pk_restart_ctx;
|
||||
#else
|
||||
/* Now we can declare functions that take a pointer to that */
|
||||
|
||||
@@ -94,6 +94,14 @@ struct mbedtls_pk_info_t
|
||||
/** Free the given context */
|
||||
void (*ctx_free_func)( void *ctx );
|
||||
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
||||
/** Allocate the restart context */
|
||||
void * (*rs_alloc_func)( void );
|
||||
|
||||
/** Free the restart context */
|
||||
void (*rs_free_func)( void *rs_ctx );
|
||||
#endif /* MBEDTLS_ECP_RESTARTABLE */
|
||||
|
||||
/** Interface with the debug module */
|
||||
void (*debug_func)( const void *ctx, mbedtls_pk_debug_item *items );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user