From 6f7680491b283863160e4ab53f76d540e4786c3d Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Mon, 2 Sep 2019 11:42:24 +0100 Subject: [PATCH] TinyCrypt ECDHE-PSK: Adapt dummy structure approximating PMS length --- include/mbedtls/ssl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index a23003cd7..74d7e40a1 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -519,7 +519,7 @@ union mbedtls_ssl_premaster_secret #endif #if defined(MBEDTLS_USE_TINYCRYPT) unsigned char _pms_ecdh_uecc[ NUM_ECC_BYTES ]; -#endif +#endif /* MBEDTLS_USE_TINYCRYPT */ #endif #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) unsigned char _pms_psk[4 + 2 * MBEDTLS_PSK_MAX_LEN]; /* RFC 4279 2 */ @@ -532,6 +532,10 @@ union mbedtls_ssl_premaster_secret unsigned char _pms_rsa_psk[52 + MBEDTLS_PSK_MAX_LEN]; /* RFC 4279 4 */ #endif #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) +#if defined(MBEDTLS_USE_TINYCRYPT) + unsigned char _pms_ecdhe_psk_uecc[4 + NUM_ECC_BYTES + + + MBEDTLS_PSK_MAX_LEN]; /* RFC 5489 2 */ +#endif /* MBEDTLS_USE_TINYCRYPT */ unsigned char _pms_ecdhe_psk[4 + MBEDTLS_ECP_MAX_BYTES + MBEDTLS_PSK_MAX_LEN]; /* RFC 5489 2 */ #endif