From 352dbe233490c00fc3eabc300ebfea48ee1d0d67 Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Tue, 7 Jun 2016 10:29:05 +0100 Subject: [PATCH] Make error messages in crypt_and_hash better. --- programs/aes/crypt_and_hash.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/programs/aes/crypt_and_hash.c b/programs/aes/crypt_and_hash.c index 4af39a542..a14d20c10 100644 --- a/programs/aes/crypt_and_hash.c +++ b/programs/aes/crypt_and_hash.c @@ -187,7 +187,7 @@ int main( int argc, char *argv[] ) if( mbedtls_md_setup( &md_ctx, md_info, 1 ) != 0 ) { - mbedtls_fprintf( stderr, "mbedtls_md_setup unsuccessful: This shouldn't happen.\n" ); + mbedtls_fprintf( stderr, "mbedtls_md_setup failed\n" ); goto exit; } @@ -404,12 +404,9 @@ int main( int argc, char *argv[] ) goto exit; } - /* - * Make coverity happy. - */ if( mbedtls_cipher_get_block_size( &cipher_ctx ) == 0 ) { - mbedtls_fprintf( stderr, "mbedtls_cipher_get_block_size returned with 0. This shouldn't happen.\n" ); + mbedtls_fprintf( stderr, "Invalid cipher block size: 0. \n" ); goto exit; }