Fix ret code in aescrypt2.c
This commit is contained in:
parent
4ed3880a10
commit
388c1b124e
1 changed files with 10 additions and 6 deletions
|
@ -29,9 +29,12 @@
|
|||
#include "mbedtls/platform.h"
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#define mbedtls_fprintf fprintf
|
||||
#define mbedtls_printf printf
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#define mbedtls_fprintf fprintf
|
||||
#define mbedtls_printf printf
|
||||
#define MBEDTLS_EXTI_SUCCESS EXIT_SUCCESS
|
||||
#define MBEDTLS_EXIT_FAILURE EXIT_FAILURE
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
||||
|
||||
#include "mbedtls/aes.h"
|
||||
#include "mbedtls/md.h"
|
||||
|
@ -71,7 +74,8 @@ int main( void )
|
|||
#else
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int ret = 1;
|
||||
int ret = 0;
|
||||
int exit_code = MBEDTLS_EXIT_FAILURE;
|
||||
|
||||
unsigned int i, n;
|
||||
int mode, lastn;
|
||||
|
@ -429,7 +433,7 @@ int main( int argc, char *argv[] )
|
|||
}
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
exit_code = MBEDTLS_EXIT_SUCCESS;
|
||||
|
||||
exit:
|
||||
if( fin )
|
||||
|
@ -452,6 +456,6 @@ exit:
|
|||
mbedtls_aes_free( &aes_ctx );
|
||||
mbedtls_md_free( &sha_ctx );
|
||||
|
||||
return( ret );
|
||||
return( exit_code );
|
||||
}
|
||||
#endif /* MBEDTLS_AES_C && MBEDTLS_SHA256_C && MBEDTLS_FS_IO */
|
||||
|
|
Loading…
Reference in a new issue