Skip to content

workaround causing TLS libs to return zero #3101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025
Merged

workaround causing TLS libs to return zero #3101

merged 1 commit into from
Apr 14, 2025

Conversation

scaprile
Copy link
Collaborator

Closes #3098

The MIP "buffer bootstrap" process causes a call to TLS functions (MbedTLS, OpenSSL) with NULL destination pointer and zero length. The intention is to pull data to start the process and have some data to size the initial buffer.
This causes these functions to return 0, thing that is correctly detected as an error condition (as per their doc, zero is an error condition) and the connection gets closed.

This PR provides a workaround for that, by catching this condition and returning 0 instead.

@scaprile scaprile merged commit 5cf1523 into master Apr 14, 2025
70 of 75 checks passed
@scaprile scaprile deleted the tlszero branch April 14, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant