Skip to content

SSL_read_ex() ... will return 1 for success or 0 for failure#9129

Merged
dgarske merged 1 commit intowolfSSL:masterfrom
effbiae:wolfSSL_read_ex
Aug 27, 2025
Merged

SSL_read_ex() ... will return 1 for success or 0 for failure#9129
dgarske merged 1 commit intowolfSSL:masterfrom
effbiae:wolfSSL_read_ex

Conversation

@effbiae
Copy link
Contributor

@effbiae effbiae commented Aug 25, 2025

Description

wolfSSL_read_ex() was returning bytes read instead of success/failure.

see man page for SSL_read_ex for compatible behaviour

Testing

without this change:

$ ./tests/unit.test 2>&1 |grep wolfSSL_read_ex -B1 -A1
ERROR - tests/api.c line 9470 failed with:
    expected: wolfSSL_read_ex(ssl_s, buf, sizeof(buf), &count) == WOLFSSL_SUCCESS
    result:   5 != 1

with this change

$ ./tests/unit.test 2>&1 |grep wolfSSL_read_ex -B1 -A1
[no output]

note the relevant test (tests/api.c:test_wolfSSL_read_write_ex()) fails but force returns TEST_SUCCESS

@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@dgarske
Copy link
Contributor

dgarske commented Aug 26, 2025

Okay to test. Contributor agreement on file. Thank you @effbiae this appears to be a good fix!

dgarske
dgarske previously approved these changes Aug 26, 2025
@dgarske
Copy link
Contributor

dgarske commented Aug 26, 2025

Hi @effbiae , the Espressif error is not related to your PR. We are working on a resolution, but I won't let it hold up this PR.

@dgarske dgarske requested a review from julek-wolfssl August 26, 2025 19:12
julek-posejdon
julek-posejdon previously approved these changes Aug 27, 2025
@dgarske
Copy link
Contributor

dgarske commented Aug 27, 2025

Jenkins retest this please: "AgentOfflineException"

@dgarske dgarske merged commit 344f127 into wolfSSL:master Aug 27, 2025
394 of 397 checks passed
@effbiae effbiae deleted the wolfSSL_read_ex branch August 28, 2025 02:14
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.

5 participants