define max md size for tls1_3

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2021-10-08 15:36:57 +08:00
parent ae0b2e2a2f
commit d1ab262844
2 changed files with 7 additions and 3 deletions

View file

@ -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.
*

View file

@ -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 */