mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +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,
|
enum HandShakeType handshakeType, word16 outputSize, byte* message,
|
||||||
word32 length, int hashOutput)
|
word32 length, int hashOutput)
|
||||||
{
|
{
|
||||||
Dtls13RtxRecord* rtxRecord;
|
Dtls13RtxRecord* rtxRecord = NULL;
|
||||||
word16 recordHeaderLength;
|
word16 recordHeaderLength;
|
||||||
byte isProtected;
|
byte isProtected;
|
||||||
int ret;
|
int ret;
|
||||||
@ -819,20 +819,23 @@ static int Dtls13SendOneFragmentRtx(WOLFSSL* ssl,
|
|||||||
isProtected = Dtls13TypeIsEncrypted(handshakeType);
|
isProtected = Dtls13TypeIsEncrypted(handshakeType);
|
||||||
recordHeaderLength = Dtls13GetRlHeaderLength(ssl, isProtected);
|
recordHeaderLength = Dtls13GetRlHeaderLength(ssl, isProtected);
|
||||||
|
|
||||||
rtxRecord = Dtls13RtxNewRecord(ssl, message + recordHeaderLength,
|
if (handshakeType != hello_retry_request) {
|
||||||
(word16)(length - recordHeaderLength), handshakeType,
|
rtxRecord = Dtls13RtxNewRecord(ssl, message + recordHeaderLength,
|
||||||
ssl->dtls13EncryptEpoch->nextSeqNumber);
|
(word16)(length - recordHeaderLength), handshakeType,
|
||||||
|
ssl->dtls13EncryptEpoch->nextSeqNumber);
|
||||||
if (rtxRecord == NULL)
|
if (rtxRecord == NULL)
|
||||||
return MEMORY_E;
|
return MEMORY_E;
|
||||||
|
}
|
||||||
|
|
||||||
ret = Dtls13SendFragment(ssl, message, outputSize, (word16)length,
|
ret = Dtls13SendFragment(ssl, message, outputSize, (word16)length,
|
||||||
handshakeType, hashOutput, Dtls13SendNow(ssl, handshakeType));
|
handshakeType, hashOutput, Dtls13SendNow(ssl, handshakeType));
|
||||||
|
|
||||||
if (ret == 0 || ret == WANT_WRITE)
|
if (rtxRecord != NULL) {
|
||||||
Dtls13RtxAddRecord(&ssl->dtls13Rtx, rtxRecord);
|
if (ret == 0 || ret == WANT_WRITE)
|
||||||
else
|
Dtls13RtxAddRecord(&ssl->dtls13Rtx, rtxRecord);
|
||||||
Dtls13FreeRtxBufferRecord(ssl, rtxRecord);
|
else
|
||||||
|
Dtls13FreeRtxBufferRecord(ssl, rtxRecord);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user