diff --git a/include/mbedtls/md.h b/include/mbedtls/md.h index fa2b152f96..34f314f3f4 100644 --- a/include/mbedtls/md.h +++ b/include/mbedtls/md.h @@ -74,6 +74,10 @@ typedef enum { #define MBEDTLS_MD_MAX_BLOCK_SIZE 64 #endif +#if defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL) +#define MBEDTLS_TLS1_3_MD_MAX_SIZE MBEDTLS_MD_MAX_SIZE +#endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */ + /** * Opaque struct. * diff --git a/library/ssl_misc.h b/library/ssl_misc.h index d194b0e1eb..b8361dbb65 100644 --- a/library/ssl_misc.h +++ b/library/ssl_misc.h @@ -678,9 +678,9 @@ struct mbedtls_ssl_handshake_params union { - unsigned char early [MBEDTLS_MD_MAX_SIZE]; - unsigned char handshake[MBEDTLS_MD_MAX_SIZE]; - unsigned char app [MBEDTLS_MD_MAX_SIZE]; + unsigned char early [MBEDTLS_TLS1_3_MD_MAX_SIZE]; + unsigned char handshake[MBEDTLS_TLS1_3_MD_MAX_SIZE]; + unsigned char app [MBEDTLS_TLS1_3_MD_MAX_SIZE]; } tls1_3_master_secrets; #endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */