mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Add missing guards in tls 1.3
Error translation is only used with these defines on. Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
@ -35,6 +35,7 @@
|
|||||||
#include "ssl_debug_helpers.h"
|
#include "ssl_debug_helpers.h"
|
||||||
#include "md_psa.h"
|
#include "md_psa.h"
|
||||||
|
|
||||||
|
#if defined(PSA_WANT_ALG_ECDH)
|
||||||
/* Define a local translating function to save code size by not using too many
|
/* Define a local translating function to save code size by not using too many
|
||||||
* arguments in each translating place. */
|
* arguments in each translating place. */
|
||||||
static int local_err_translation(psa_status_t status)
|
static int local_err_translation(psa_status_t status)
|
||||||
@ -44,6 +45,8 @@ static int local_err_translation(psa_status_t status)
|
|||||||
psa_generic_status_to_mbedtls);
|
psa_generic_status_to_mbedtls);
|
||||||
}
|
}
|
||||||
#define PSA_TO_MBEDTLS_ERR(status) local_err_translation(status)
|
#define PSA_TO_MBEDTLS_ERR(status) local_err_translation(status)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Write extensions */
|
/* Write extensions */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -39,6 +39,8 @@
|
|||||||
#include "psa/crypto.h"
|
#include "psa/crypto.h"
|
||||||
#include "mbedtls/psa_util.h"
|
#include "mbedtls/psa_util.h"
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED) || \
|
||||||
|
defined(PSA_WANT_ALG_ECDH)
|
||||||
/* Define a local translating function to save code size by not using too many
|
/* Define a local translating function to save code size by not using too many
|
||||||
* arguments in each translating place. */
|
* arguments in each translating place. */
|
||||||
static int local_err_translation(psa_status_t status)
|
static int local_err_translation(psa_status_t status)
|
||||||
@ -48,6 +50,7 @@ static int local_err_translation(psa_status_t status)
|
|||||||
psa_generic_status_to_mbedtls);
|
psa_generic_status_to_mbedtls);
|
||||||
}
|
}
|
||||||
#define PSA_TO_MBEDTLS_ERR(status) local_err_translation(status)
|
#define PSA_TO_MBEDTLS_ERR(status) local_err_translation(status)
|
||||||
|
#endif
|
||||||
|
|
||||||
const uint8_t mbedtls_ssl_tls13_hello_retry_request_magic[
|
const uint8_t mbedtls_ssl_tls13_hello_retry_request_magic[
|
||||||
MBEDTLS_SERVER_HELLO_RANDOM_LEN] =
|
MBEDTLS_SERVER_HELLO_RANDOM_LEN] =
|
||||||
|
Reference in New Issue
Block a user