Skip to content

Commit

Permalink
Merge pull request #4705 from JacobBarthelmeh/DTLS
Browse files Browse the repository at this point in the history
account for DTLS extra header size when reading msg from pool
  • Loading branch information
dgarske authored Dec 28, 2021
2 parents a07673a + 05a19c8 commit 2b670c0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Release 5.1.0 of wolfSSL embedded TLS has bug fixes and new features including:
* Fix for build with OPENSSL_EXTRA and NO_WOLFSSL_STUB both defined
* Use page aligned memory with ECDSA signing and KCAPI
* Skip expired sessions for TLS 1.3 rather than turning off the resume behavior
* Fix for DTLS handling dropped or retransmitted messages

### Improvements/Optimizations
###### Build Options and Warnings
Expand Down
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Release 5.1.0 of wolfSSL embedded TLS has bug fixes and new features including:
* Fix for build with OPENSSL_EXTRA and NO_WOLFSSL_STUB both defined
* Use page aligned memory with ECDSA signing and KCAPI
* Skip expired sessions for TLS 1.3 rather than turning off the resume behavior
* Fix for DTLS handling dropped or retransmitted messages

### Improvements/Optimizations
###### Build Options and Warnings
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ Release 5.1.0 of wolfSSL embedded TLS has bug fixes and new features including:
* Fix for build with OPENSSL_EXTRA and NO_WOLFSSL_STUB both defined
* Use page aligned memory with ECDSA signing and KCAPI
* Skip expired sessions for TLS 1.3 rather than turning off the resume behavior
* Fix for DTLS handling dropped or retransmitted messages
### Improvements/Optimizations
###### Build Options and Warnings
Expand Down
4 changes: 4 additions & 0 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -8224,6 +8224,10 @@ int DtlsMsgPoolSend(WOLFSSL* ssl, int sendOnlyFirstPacket)
#endif


/* add back in header space from saved pool size */
sendSz += DTLS_HANDSHAKE_EXTRA;
sendSz += DTLS_RECORD_EXTRA;

if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) {
WOLFSSL_ERROR(ret);
return ret;
Expand Down

0 comments on commit 2b670c0

Please sign in to comment.