Make hmac_ctx optional
Note from future self: actually md_init_ctx will be re-introduced with the
same signature later, and a new function with the additional argument will be
added.
diff --git a/programs/aes/aescrypt2.c b/programs/aes/aescrypt2.c
index e61ba7d..e14acae 100644
--- a/programs/aes/aescrypt2.c
+++ b/programs/aes/aescrypt2.c
@@ -101,7 +101,7 @@
aes_init( &aes_ctx );
md_init( &sha_ctx );
- ret = md_init_ctx( &sha_ctx, md_info_from_type( POLARSSL_MD_SHA256 ) );
+ ret = md_init_ctx( &sha_ctx, md_info_from_type( POLARSSL_MD_SHA256 ), 1 );
if( ret != 0 )
{
polarssl_printf( " ! md_init_ctx() returned -0x%04x\n", -ret );
diff --git a/programs/aes/crypt_and_hash.c b/programs/aes/crypt_and_hash.c
index a1406b6..2a3f3cc 100644
--- a/programs/aes/crypt_and_hash.c
+++ b/programs/aes/crypt_and_hash.c
@@ -185,7 +185,7 @@
polarssl_fprintf( stderr, "Message Digest '%s' not found\n", argv[5] );
goto exit;
}
- md_init_ctx( &md_ctx, md_info);
+ md_init_ctx( &md_ctx, md_info, 1 );
/*
* Read the secret key and clean the command line.