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

Don't use BIO for message transfer #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chadnickbok
Copy link
Collaborator

OpenSSL Buffered I/O doesn't preserver message boundaries when using the
memory-based BIO. This means that multiple messages can be returned on a
single call to BIO_read, which is incompatible with DTLS and usrsctp.

This patch changes all cross-thread messaging to use GQueue-based
message queues isntead of memory-backed BIO structures.

OpenSSL Buffered I/O doesn't preserver message boundaries when using the
memory-based BIO. This means that multiple messages can be returned on a
single call to BIO_read, which is incompatible with DTLS and usrsctp.

This patch changes all cross-thread messaging to use GQueue-based
message queues isntead of memory-backed BIO structures.
Removed some copy-pasta for flushing the DTLS outgoing memory bio. Now
its a nice function in one place.

Also removed some old use of the outgoing bio. Now, any time SSL_read or
SSL_write is called, there should be a corresponding call to flush.
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.

1 participant