mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-02 09:01:05 +00:00
TinyCrypt PK wrap: Implement alloc/free PK wrappers
This commit is contained in:
parent
11cb2637e7
commit
4102972d31
|
@ -48,7 +48,8 @@
|
|||
#include "mbedtls/ecdsa.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT)
|
||||
#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) || \
|
||||
defined(MBEDTLS_USE_TINYCRYPT)
|
||||
#include "mbedtls/platform_util.h"
|
||||
#endif
|
||||
|
||||
|
@ -684,20 +685,16 @@ static int uecc_eckey_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
|
|||
|
||||
static void *uecc_eckey_alloc_wrap( void )
|
||||
{
|
||||
/*void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ecdsa_context ) );
|
||||
|
||||
if( ctx != NULL )
|
||||
mbedtls_ecdsa_init( (mbedtls_ecdsa_context *) ctx );
|
||||
|
||||
return( ctx );*/
|
||||
return NULL;
|
||||
return( mbedtls_calloc( 1, sizeof( mbedtls_uecc_keypair ) ) );
|
||||
}
|
||||
|
||||
static void uecc_eckey_free_wrap( void *ctx )
|
||||
{
|
||||
(void) ctx;
|
||||
/*mbedtls_ecdsa_free( (mbedtls_ecdsa_context *) ctx );
|
||||
mbedtls_free( ctx );*/
|
||||
if( ctx == NULL )
|
||||
return;
|
||||
|
||||
mbedtls_platform_zeroize( ctx, sizeof( mbedtls_uecc_keypair ) );
|
||||
mbedtls_free( ctx );
|
||||
}
|
||||
|
||||
const mbedtls_pk_info_t mbedtls_uecc_eckey_info = {
|
||||
|
|
Loading…
Reference in a new issue