mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
fix: wrong size using DTLSv1.3 in RestartHandshakeHashWithCookie
HRR_MAX_HS_HEADER_SZ does not consider DTLS handshake extra fields.
This commit is contained in:
@ -3197,7 +3197,11 @@ static int CreateCookie(WOLFSSL* ssl, byte* hash, byte hashSz)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_DTLS13
|
||||||
|
#define HRR_MAX_HS_HEADER_SZ DTLS_HANDSHAKE_HEADER_SZ
|
||||||
|
#else
|
||||||
#define HRR_MAX_HS_HEADER_SZ HANDSHAKE_HEADER_SZ
|
#define HRR_MAX_HS_HEADER_SZ HANDSHAKE_HEADER_SZ
|
||||||
|
#endif /* WOLFSSL_DTLS13 */
|
||||||
|
|
||||||
/* Restart the handshake hash with a hash of the previous messages.
|
/* Restart the handshake hash with a hash of the previous messages.
|
||||||
*
|
*
|
||||||
@ -3208,7 +3212,7 @@ int RestartHandshakeHash(WOLFSSL* ssl)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
Hashes hashes;
|
Hashes hashes;
|
||||||
byte header[HRR_MAX_HS_HEADER_SZ] = {0};
|
byte header[HANDSHAKE_HEADER_SZ] = {0};
|
||||||
byte* hash = NULL;
|
byte* hash = NULL;
|
||||||
byte hashSz = 0;
|
byte hashSz = 0;
|
||||||
|
|
||||||
@ -5396,7 +5400,7 @@ static int CheckCookie(WOLFSSL* ssl, byte* cookie, byte cookieSz)
|
|||||||
*/
|
*/
|
||||||
static int RestartHandshakeHashWithCookie(WOLFSSL* ssl, Cookie* cookie)
|
static int RestartHandshakeHashWithCookie(WOLFSSL* ssl, Cookie* cookie)
|
||||||
{
|
{
|
||||||
byte header[HRR_MAX_HS_HEADER_SZ] = {0};
|
byte header[HANDSHAKE_HEADER_SZ] = {0};
|
||||||
byte hrr[MAX_HRR_SZ] = {0};
|
byte hrr[MAX_HRR_SZ] = {0};
|
||||||
int hrrIdx;
|
int hrrIdx;
|
||||||
word32 idx;
|
word32 idx;
|
||||||
|
@ -52,3 +52,19 @@
|
|||||||
-u
|
-u
|
||||||
-s
|
-s
|
||||||
-l TLS13-AES256-GCM-SHA384
|
-l TLS13-AES256-GCM-SHA384
|
||||||
|
|
||||||
|
# server TLSv1.3 PSK and resumption
|
||||||
|
# AES256-GCM and SHA384
|
||||||
|
-v 4
|
||||||
|
-u
|
||||||
|
-s
|
||||||
|
-l TLS13-AES256-GCM-SHA384
|
||||||
|
-r
|
||||||
|
|
||||||
|
# client TLSv1.3 PSK
|
||||||
|
# AES256-GCM and SHA384
|
||||||
|
-v 4
|
||||||
|
-u
|
||||||
|
-s
|
||||||
|
-l TLS13-AES256-GCM-SHA384
|
||||||
|
-r
|
||||||
|
Reference in New Issue
Block a user