mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
DTLS 1.3: Don't add HRR to ssl->dtls13Rtx
Signed-off-by: Marco Oliverio <marco@wolfssl.com>
This commit is contained in:
committed by
Marco Oliverio
parent
145086f776
commit
c72d315325
25
src/dtls13.c
25
src/dtls13.c
@ -811,7 +811,7 @@ static int Dtls13SendOneFragmentRtx(WOLFSSL* ssl,
|
||||
enum HandShakeType handshakeType, word16 outputSize, byte* message,
|
||||
word32 length, int hashOutput)
|
||||
{
|
||||
Dtls13RtxRecord* rtxRecord;
|
||||
Dtls13RtxRecord* rtxRecord = NULL;
|
||||
word16 recordHeaderLength;
|
||||
byte isProtected;
|
||||
int ret;
|
||||
@ -819,20 +819,23 @@ static int Dtls13SendOneFragmentRtx(WOLFSSL* ssl,
|
||||
isProtected = Dtls13TypeIsEncrypted(handshakeType);
|
||||
recordHeaderLength = Dtls13GetRlHeaderLength(ssl, isProtected);
|
||||
|
||||
rtxRecord = Dtls13RtxNewRecord(ssl, message + recordHeaderLength,
|
||||
(word16)(length - recordHeaderLength), handshakeType,
|
||||
ssl->dtls13EncryptEpoch->nextSeqNumber);
|
||||
|
||||
if (rtxRecord == NULL)
|
||||
return MEMORY_E;
|
||||
if (handshakeType != hello_retry_request) {
|
||||
rtxRecord = Dtls13RtxNewRecord(ssl, message + recordHeaderLength,
|
||||
(word16)(length - recordHeaderLength), handshakeType,
|
||||
ssl->dtls13EncryptEpoch->nextSeqNumber);
|
||||
if (rtxRecord == NULL)
|
||||
return MEMORY_E;
|
||||
}
|
||||
|
||||
ret = Dtls13SendFragment(ssl, message, outputSize, (word16)length,
|
||||
handshakeType, hashOutput, Dtls13SendNow(ssl, handshakeType));
|
||||
|
||||
if (ret == 0 || ret == WANT_WRITE)
|
||||
Dtls13RtxAddRecord(&ssl->dtls13Rtx, rtxRecord);
|
||||
else
|
||||
Dtls13FreeRtxBufferRecord(ssl, rtxRecord);
|
||||
if (rtxRecord != NULL) {
|
||||
if (ret == 0 || ret == WANT_WRITE)
|
||||
Dtls13RtxAddRecord(&ssl->dtls13Rtx, rtxRecord);
|
||||
else
|
||||
Dtls13FreeRtxBufferRecord(ssl, rtxRecord);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user