mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Adapt programs / test suites to _init() and _free()
This commit is contained in:
@ -93,6 +93,8 @@ int main( int argc, char *argv[] )
|
||||
off_t filesize, offset;
|
||||
#endif
|
||||
|
||||
aes_init( &aes_ctx );
|
||||
|
||||
/*
|
||||
* Parse the command-line arguments.
|
||||
*/
|
||||
@ -357,7 +359,7 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
|
||||
memset( key, 0, sizeof( key ) );
|
||||
aes_setkey_dec( &aes_ctx, digest, 256 );
|
||||
aes_setkey_dec( &aes_ctx, digest, 256 );
|
||||
sha256_hmac_starts( &sha_ctx, digest, 32, 0 );
|
||||
|
||||
/*
|
||||
@ -426,7 +428,7 @@ exit:
|
||||
memset( buffer, 0, sizeof( buffer ) );
|
||||
memset( digest, 0, sizeof( digest ) );
|
||||
|
||||
memset( &aes_ctx, 0, sizeof( aes_context ) );
|
||||
aes_free( &aes_ctx );
|
||||
memset( &sha_ctx, 0, sizeof( sha256_context ) );
|
||||
|
||||
return( ret );
|
||||
|
Reference in New Issue
Block a user