mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 09:35:39 +00:00
Some more init calls
This commit is contained in:
parent
496f24e949
commit
96fb685e31
|
@ -78,7 +78,12 @@
|
|||
/* shared by all GCM ciphers */
|
||||
static void *gcm_ctx_alloc( void )
|
||||
{
|
||||
return mbedtls_calloc( 1, sizeof( mbedtls_gcm_context ) );
|
||||
void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_gcm_context ) );
|
||||
|
||||
if( ctx != NULL )
|
||||
mbedtls_gcm_init( (mbedtls_gcm_context *) ctx );
|
||||
|
||||
return( ctx );
|
||||
}
|
||||
|
||||
static void gcm_ctx_free( void *ctx )
|
||||
|
@ -92,7 +97,12 @@ static void gcm_ctx_free( void *ctx )
|
|||
/* shared by all CCM ciphers */
|
||||
static void *ccm_ctx_alloc( void )
|
||||
{
|
||||
return mbedtls_calloc( 1, sizeof( mbedtls_ccm_context ) );
|
||||
void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ccm_context ) );
|
||||
|
||||
if( ctx != NULL )
|
||||
mbedtls_ccm_init( (mbedtls_ccm_context *) ctx );
|
||||
|
||||
return( ctx );
|
||||
}
|
||||
|
||||
static void ccm_ctx_free( void *ctx )
|
||||
|
|
Loading…
Reference in a new issue