mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-02 21:06:37 +03:00
Fix test failure issue and update code styles
Change-Id: I0b08da1b083abdb19dc383e6f4b210f66659c109 Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
This commit is contained in:
@ -65,7 +65,7 @@ int main( void )
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||
#include "test/psa_crypto_helpers.h"
|
||||
#endif
|
||||
|
||||
@ -1421,7 +1421,7 @@ int main( int argc, char *argv[] )
|
||||
int i;
|
||||
char *p, *q;
|
||||
const int *list;
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||
psa_status_t status;
|
||||
#endif
|
||||
unsigned char eap_tls_keymaterial[16];
|
||||
@ -1487,7 +1487,7 @@ int main( int argc, char *argv[] )
|
||||
mbedtls_ssl_cookie_init( &cookie_ctx );
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||
status = psa_crypto_init();
|
||||
if( status != PSA_SUCCESS )
|
||||
{
|
||||
@ -4127,7 +4127,7 @@ exit:
|
||||
#endif /* MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED &&
|
||||
MBEDTLS_USE_PSA_CRYPTO */
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||
const char* message = mbedtls_test_helper_is_psa_leaking();
|
||||
if( message )
|
||||
{
|
||||
@ -4139,8 +4139,8 @@ exit:
|
||||
|
||||
/* For builds with MBEDTLS_TEST_USE_PSA_CRYPTO_RNG psa crypto
|
||||
* resources are freed by rng_free(). */
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
||||
!defined(MBEDTLS_TEST_USE_PSA_CRYPTO_RNG)
|
||||
#if ( defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_SSL_PROTO_TLS1_3) ) \
|
||||
&& !defined(MBEDTLS_TEST_USE_PSA_CRYPTO_RNG)
|
||||
mbedtls_psa_crypto_free( );
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user