From 8ca4a6086ef4a7d65650608b09c41eca0f10e2c8 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Mon, 19 Sep 2022 14:00:13 +0200 Subject: [PATCH] 0 len sz is allowed In async mode, we always store all handshake messages before processing them. The server hello done message has a length of 0 but we still need to store it to process it. --- src/internal.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/internal.c b/src/internal.c index 1384c7680..d092e60f2 100644 --- a/src/internal.c +++ b/src/internal.c @@ -8152,13 +8152,6 @@ DtlsMsg* DtlsMsgNew(word32 sz, byte tx, void* heap) DtlsMsg* msg; WOLFSSL_ENTER("DtlsMsgNew()"); -#ifndef WOLFSSL_ASYNC_CRYPT - if (sz == 0) { - WOLFSSL_MSG("DtlsMsgNew: sz == 0 not allowed"); - return NULL; - } -#endif - (void)heap; msg = (DtlsMsg*)XMALLOC(sizeof(DtlsMsg), heap, DYNAMIC_TYPE_DTLS_MSG);