From 1aed7779ec344b7d37ee2fec7a1b33e38790d270 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Fri, 22 Feb 2019 16:27:15 +0000 Subject: [PATCH] Remove misleading and redundant guard around restartable ECC field `MBEDTLS_SSL__ECP_RESTARTABLE` is only defined if `MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED` is set, which requires `MBEDTLS_X509_PARSE_C` to be set (this is checked in `check_config.`). The additional `MBEDTLS_X509_PARSE_C` guard around the `ecrs_peer_cert` field is therefore not necessary; moreover, it's misleading, because it hasn't been used consistently throughout the code. --- include/mbedtls/ssl_internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h index 549911572..0d543c19b 100644 --- a/include/mbedtls/ssl_internal.h +++ b/include/mbedtls/ssl_internal.h @@ -331,9 +331,7 @@ struct mbedtls_ssl_handshake_params ssl_ecrs_cke_ecdh_calc_secret, /*!< ClientKeyExchange: ECDH step 2 */ ssl_ecrs_crt_vrfy_sign, /*!< CertificateVerify: pk_sign() */ } ecrs_state; /*!< current (or last) operation */ -#if defined(MBEDTLS_X509_CRT_PARSE_C) mbedtls_x509_crt *ecrs_peer_cert; /*!< The peer's CRT chain. */ -#endif /* MBEDTLS_X509_CRT_PARSE_C */ size_t ecrs_n; /*!< place for saving a length */ #endif #if defined(MBEDTLS_X509_CRT_PARSE_C) && \