Adapt cipher and MD layer with _init() and _free()
diff --git a/library/ccm.c b/library/ccm.c
index 91dee67..60477d0 100644
--- a/library/ccm.c
+++ b/library/ccm.c
@@ -61,6 +61,8 @@
memset( ctx, 0, sizeof( ccm_context ) );
+ cipher_init( &ctx->cipher_ctx );
+
cipher_info = cipher_info_from_values( cipher, keysize, POLARSSL_MODE_ECB );
if( cipher_info == NULL )
return( POLARSSL_ERR_CCM_BAD_INPUT );
@@ -85,7 +87,7 @@
*/
void ccm_free( ccm_context *ctx )
{
- (void) cipher_free_ctx( &ctx->cipher_ctx );
+ cipher_free( &ctx->cipher_ctx );
polarssl_zeroize( ctx, sizeof( ccm_context ) );
}