Skip to content
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

Fix spurious "success" on SSL system errors: #182

Closed
wants to merge 1 commit into from

Conversation

vinniefalco
Copy link
Member

Fix boostorg/beast#807
Fix boostorg/beast#1373

This resolves an issue where an ssl::stream read operation
returns a successful error code but zero bytes transferred,
violating its contract.

  • Treat SSL_ERROR_ZERO_RETURN as EOF

  • Use the ssl category for sys_error

  • On error, if sys_error is 0 (success),
    return ssl::errors::read_sys_error instead.

Fix boostorg/beast#807
Fix boostorg/beast#1373

This resolves an issue where an ssl::stream read operation
returns a successful error code but zero bytes transferred,
violating its contract.

* Treat SSL_ERROR_ZERO_RETURN as EOF

* Use the ssl category for sys_error

* On error, if sys_error is 0 (success),
  return ssl::errors::read_sys_error instead.
@vinniefalco
Copy link
Member Author

Fixed here; ce7e3bb

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.

bytes_transferred > 0 assertion fails Assertion failed: (bytes_transferred > 0)
1 participant