mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 17:05:42 +01:00
Fix ret code in aescrypt2.c
This commit is contained in:
parent
4ed3880a10
commit
388c1b124e
@ -29,9 +29,12 @@
|
|||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define mbedtls_fprintf fprintf
|
#include <stdlib.h>
|
||||||
#define mbedtls_printf printf
|
#define mbedtls_fprintf fprintf
|
||||||
#endif
|
#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/aes.h"
|
||||||
#include "mbedtls/md.h"
|
#include "mbedtls/md.h"
|
||||||
@ -71,7 +74,8 @@ int main( void )
|
|||||||
#else
|
#else
|
||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
int ret = 1;
|
int ret = 0;
|
||||||
|
int exit_code = MBEDTLS_EXIT_FAILURE;
|
||||||
|
|
||||||
unsigned int i, n;
|
unsigned int i, n;
|
||||||
int mode, lastn;
|
int mode, lastn;
|
||||||
@ -429,7 +433,7 @@ int main( int argc, char *argv[] )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
exit_code = MBEDTLS_EXIT_SUCCESS;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
if( fin )
|
if( fin )
|
||||||
@ -452,6 +456,6 @@ exit:
|
|||||||
mbedtls_aes_free( &aes_ctx );
|
mbedtls_aes_free( &aes_ctx );
|
||||||
mbedtls_md_free( &sha_ctx );
|
mbedtls_md_free( &sha_ctx );
|
||||||
|
|
||||||
return( ret );
|
return( exit_code );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_AES_C && MBEDTLS_SHA256_C && MBEDTLS_FS_IO */
|
#endif /* MBEDTLS_AES_C && MBEDTLS_SHA256_C && MBEDTLS_FS_IO */
|
||||||
|
Loading…
Reference in New Issue
Block a user