Skip to content

tls13: wolfSSL_read_early_data() set outSz to 0 if no early data and update doc#7222

Merged
dgarske merged 2 commits intowolfSSL:masterfrom
rizlik:early_data_fix
Feb 12, 2024
Merged

tls13: wolfSSL_read_early_data() set outSz to 0 if no early data and update doc#7222
dgarske merged 2 commits intowolfSSL:masterfrom
rizlik:early_data_fix

Conversation

@rizlik
Copy link
Copy Markdown
Contributor

@rizlik rizlik commented Feb 7, 2024

Description

The function has a different return behavior compared to the doc. It also fails to set outSz to zero if no early data are received. Fixed and updated the doc.

@rizlik rizlik self-assigned this Feb 7, 2024
@rizlik rizlik requested a review from julek-wolfssl February 7, 2024 14:40
@rizlik rizlik assigned julek-wolfssl and unassigned rizlik Feb 7, 2024
Comment thread src/tls13.c Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be better to do this at the very beginning of the function in all cases?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My rationale was that if the function errors out then it doesn't change the parameter.
But I'm ok moving that at the beginning as well.

@julek-wolfssl julek-wolfssl assigned rizlik and unassigned julek-wolfssl Feb 7, 2024
@rizlik rizlik assigned julek-wolfssl and unassigned rizlik Feb 8, 2024
If not data is read, set outSz to 0. This way the
caller can detect if no early data was read.
@dgarske dgarske merged commit 06f04de into wolfSSL:master Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants