Skip to content

wolfssl: when SSL_read() returns zero, check the error#8431

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/wolfssl-recv-zero
Closed

wolfssl: when SSL_read() returns zero, check the error#8431
bagder wants to merge 2 commits into
masterfrom
bagder/wolfssl-recv-zero

Conversation

@bagder

@bagder bagder commented Feb 10, 2022

Copy link
Copy Markdown
Member

Returning zero typically indicates end of connection, so if there's no
data read but the connection is alive, it needs to return -1 with
CURLE_AGAIN.

@bagder bagder added the TLS label Feb 10, 2022

@dgarske dgarske left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix looks good. Thanks Daniel.

Comment thread lib/vtls/wolfssl.c
Returning zero indicates end of connection, so if there's no data read
but the connection is alive, it needs to return -1 with CURLE_AGAIN.

Closes #8431
@bagder

bagder commented Feb 11, 2022

Copy link
Copy Markdown
Member Author

The user who ran into the problem that made me submit this PR to begin with, has confirmed that this fixes their problem.

@bagder bagder closed this in 327ef30 Feb 11, 2022
bagder added a commit that referenced this pull request Feb 11, 2022
@bagder bagder deleted the bagder/wolfssl-recv-zero branch February 11, 2022 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants