Skip to content

Commit 16dc67f

Browse files
julek-wolfsslmiyazakh
authored andcommitted
SendTls13Certificate: set variables directly instead of incrementing
1 parent 29e2788 commit 16dc67f

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/tls13.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8614,9 +8614,6 @@ static int SendTls13Certificate(WOLFSSL* ssl)
86148614
for (extIdx = 0; extIdx < (word16)XELEM_CNT(extSz); extIdx++)
86158615
extSz[extIdx] = OPAQUE16_LEN;
86168616

8617-
length = 0;
8618-
listSz = 0;
8619-
86208617
#if defined(HAVE_CERTIFICATE_STATUS_REQUEST)
86218618
/* We only send CSR on the server side. On client side, the CSR data
86228619
* is populated with the server response. We would be sending the server
@@ -8639,9 +8636,9 @@ static int SendTls13Certificate(WOLFSSL* ssl)
86398636
}
86408637

86418638
/* Length of message data with one certificate and extensions. */
8642-
length += (sword32)(headerSz + certSz + totalextSz);
8639+
length = (sword32)(headerSz + certSz + totalextSz);
86438640
/* Length of list data with one certificate and extensions. */
8644-
listSz += CERT_HEADER_SZ + certSz + totalextSz;
8641+
listSz = CERT_HEADER_SZ + certSz + totalextSz;
86458642

86468643
/* Send rest of chain if sending cert (chain has leading size/s). */
86478644
if (certSz > 0 && ssl->buffers.certChainCnt > 0) {

0 commit comments

Comments
 (0)