mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 22:05:42 +01:00
Fix ret code in ecdh_curve25519.c
This commit is contained in:
parent
c899c464f6
commit
81982c84d4
@ -29,8 +29,11 @@
|
||||
#include "mbedtls/platform.h"
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#define mbedtls_printf printf
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#define mbedtls_printf printf
|
||||
#define MBEDTLS_EXTI_SUCCESS EXIT_SUCCESS
|
||||
#define MBEDTLS_EXIT_FAILURE EXIT_FAILURE
|
||||
#endif /* MBEDTLS_PLATFORM_C */
|
||||
|
||||
#if !defined(MBEDTLS_ECDH_C) || \
|
||||
!defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) || \
|
||||
@ -51,7 +54,8 @@ int main( void )
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int ret;
|
||||
int ret = 1;
|
||||
int exit_code = MBEDTLS_EXIT_FAILURE;
|
||||
mbedtls_ecdh_context ctx_cli, ctx_srv;
|
||||
mbedtls_entropy_context entropy;
|
||||
mbedtls_ctr_drbg_context ctr_drbg;
|
||||
@ -218,6 +222,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
mbedtls_printf( " ok\n" );
|
||||
|
||||
exit_code = MBEDTLS_EXIT_SUCCESS;
|
||||
|
||||
exit:
|
||||
|
||||
@ -231,7 +236,7 @@ exit:
|
||||
mbedtls_ctr_drbg_free( &ctr_drbg );
|
||||
mbedtls_entropy_free( &entropy );
|
||||
|
||||
return( ret != 0 );
|
||||
return( exit_code );
|
||||
}
|
||||
#endif /* MBEDTLS_ECDH_C && MBEDTLS_ECP_DP_CURVE25519_ENABLED &&
|
||||
MBEDTLS_ENTROPY_C && MBEDTLS_CTR_DRBG_C */
|
||||
|
Loading…
Reference in New Issue
Block a user