Merge pull request #5524 from mprse/tls_ecdh_2c
TLS ECDH 2c: ECHDE in TLS 1.3 (client-side)
This commit is contained in:
commit
d815114f93
6 changed files with 126 additions and 92 deletions
|
@ -21,9 +21,9 @@
|
|||
|
||||
#include "ssl_test_lib.h"
|
||||
|
||||
#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
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO || MBEDTLS_SSL_PROTO_TLS1_3 */
|
||||
|
||||
#if defined(MBEDTLS_SSL_TEST_IMPOSSIBLE)
|
||||
int main( void )
|
||||
|
@ -698,6 +698,8 @@ int main( int argc, char *argv[] )
|
|||
psa_key_attributes_t key_attributes;
|
||||
#endif
|
||||
psa_status_t status;
|
||||
#elif defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||
psa_status_t status;
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||
|
@ -770,7 +772,7 @@ int main( int argc, char *argv[] )
|
|||
memset( (void * ) alpn_list, 0, sizeof( alpn_list ) );
|
||||
#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 )
|
||||
{
|
||||
|
@ -779,7 +781,7 @@ int main( int argc, char *argv[] )
|
|||
ret = MBEDTLS_ERR_SSL_HW_ACCEL_FAILED;
|
||||
goto exit;
|
||||
}
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO || MBEDTLS_SSL_PROTO_TLS1_3 */
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
|
||||
mbedtls_test_enable_insecure_external_rng( );
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG */
|
||||
|
@ -3085,7 +3087,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 )
|
||||
{
|
||||
|
@ -3093,11 +3095,11 @@ exit:
|
|||
ret = 1;
|
||||
mbedtls_printf( "PSA memory leak detected: %s\n", message);
|
||||
}
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO || MBEDTLS_SSL_PROTO_TLS1_3 */
|
||||
|
||||
/* For builds with MBEDTLS_TEST_USE_PSA_CRYPTO_RNG psa crypto
|
||||
* resources are freed by rng_free(). */
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) && \
|
||||
#if (defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_SSL_PROTO_TLS1_3)) && \
|
||||
!defined(MBEDTLS_TEST_USE_PSA_CRYPTO_RNG)
|
||||
mbedtls_psa_crypto_free( );
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue