mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Introduce and use MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED
Introduce and use MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED to guard TLS code (both 1.2 and 1.3) specific to handshakes involving PSKs. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@ -2076,7 +2076,7 @@ void perform_handshake( handshake_test_options *options )
|
||||
int forced_ciphersuite[2];
|
||||
enum { BUFFSIZE = 17000 };
|
||||
mbedtls_endpoint client, server;
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
|
||||
#if defined(MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED)
|
||||
const char *psk_identity = "foo";
|
||||
#endif
|
||||
#if defined(MBEDTLS_TIMING_C)
|
||||
@ -2188,7 +2188,7 @@ void perform_handshake( handshake_test_options *options )
|
||||
TEST_ASSERT( MBEDTLS_SSL_MAX_FRAG_LEN_NONE == options->mfl );
|
||||
#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */
|
||||
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
|
||||
#if defined(MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED)
|
||||
if( options->psk_str != NULL && options->psk_str->len > 0 )
|
||||
{
|
||||
TEST_ASSERT( mbedtls_ssl_conf_psk( &client.conf, options->psk_str->x,
|
||||
@ -5621,7 +5621,7 @@ exit:
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED */
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED */
|
||||
void test_multiple_psks()
|
||||
{
|
||||
unsigned char psk0[10] = { 0 };
|
||||
@ -5651,7 +5651,7 @@ exit:
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED:MBEDTLS_USE_PSA_CRYPTO */
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED:MBEDTLS_USE_PSA_CRYPTO */
|
||||
void test_multiple_psks_opaque( int mode )
|
||||
{
|
||||
/*
|
||||
|
Reference in New Issue
Block a user