Skip to content

tls-openssl.c: Handle errors in read/write operations#1506

Merged
zdohnal merged 1 commit intoOpenPrinting:masterfrom
zdohnal:openssl-write-error-handle
Mar 5, 2026
Merged

tls-openssl.c: Handle errors in read/write operations#1506
zdohnal merged 1 commit intoOpenPrinting:masterfrom
zdohnal:openssl-write-error-handle

Conversation

@zdohnal
Copy link
Member

@zdohnal zdohnal commented Mar 4, 2026

Openssl functions return values <= 0, so we have to handle them separately to process the errors later together in the same code segment.

@zdohnal zdohnal requested a review from michaelrsweet March 4, 2026 11:23
Openssl functions return values <= 0, so we have to handle them
separately to process the errors later together in the same code
segment.
Copy link
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

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

Looks reasonable enough, would be nice to get more detailed errors but at this level we really don't have a way to bubble those up...

@zdohnal
Copy link
Member Author

zdohnal commented Mar 5, 2026

@michaelrsweet thx! I focused here on the fact which errors are recoverable and which not for now - the only relevant ones looked the WANT_READ/WANT_WRITE errors, because the other was happening only when *_set_mode was used, which we don't.

Once I merge this, I will add some comments into the functions to make it clear.

@zdohnal zdohnal merged commit ebd5109 into OpenPrinting:master Mar 5, 2026
6 checks passed
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.

2 participants