Skip to content

Don't use BIO for message transfer#12

Open
chadnickbok wants to merge 3 commits intomasterfrom
feature/use_queues_not_bios
Open

Don't use BIO for message transfer#12
chadnickbok wants to merge 3 commits intomasterfrom
feature/use_queues_not_bios

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