mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-26 07:35:35 +00:00
Fix ret code in crl_app.c
This commit is contained in:
parent
a7ac5ab2ee
commit
8fe4d917f7
|
@ -29,8 +29,11 @@
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#define mbedtls_printf printf
|
#define mbedtls_printf printf
|
||||||
#endif
|
#define MBEDTLS_EXTI_SUCCESS EXIT_SUCCESS
|
||||||
|
#define MBEDTLS_EXIT_FAILURE EXIT_FAILURE
|
||||||
|
#endif /* MBEDTLS_PLATFORM_C */
|
||||||
|
|
||||||
#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_RSA_C) || \
|
#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_RSA_C) || \
|
||||||
!defined(MBEDTLS_X509_CRL_PARSE_C) || !defined(MBEDTLS_FS_IO)
|
!defined(MBEDTLS_X509_CRL_PARSE_C) || !defined(MBEDTLS_FS_IO)
|
||||||
|
@ -67,7 +70,8 @@ struct options
|
||||||
|
|
||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 1;
|
||||||
|
int exit_code = MBEDTLS_EXIT_FAILURE;
|
||||||
unsigned char buf[100000];
|
unsigned char buf[100000];
|
||||||
mbedtls_x509_crl crl;
|
mbedtls_x509_crl crl;
|
||||||
int i;
|
int i;
|
||||||
|
@ -131,6 +135,8 @@ int main( int argc, char *argv[] )
|
||||||
|
|
||||||
mbedtls_printf( "%s\n", buf );
|
mbedtls_printf( "%s\n", buf );
|
||||||
|
|
||||||
|
exit_code = MBEDTLS_EXIT_SUCCESS;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
mbedtls_x509_crl_free( &crl );
|
mbedtls_x509_crl_free( &crl );
|
||||||
|
|
||||||
|
@ -139,7 +145,7 @@ exit:
|
||||||
fflush( stdout ); getchar();
|
fflush( stdout ); getchar();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return( ret );
|
return( exit_code );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_X509_CRL_PARSE_C &&
|
#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_RSA_C && MBEDTLS_X509_CRL_PARSE_C &&
|
||||||
MBEDTLS_FS_IO */
|
MBEDTLS_FS_IO */
|
||||||
|
|
Loading…
Reference in a new issue