Skip to content

Conversation

@ejona86
Copy link

@ejona86 ejona86 commented Sep 4, 2018

Delay starting until after the StartTLS handshake as otherwise
LDAPConnection.reader() can "steal" reads during the TLS handshake.
Also, it's not safe to change l.conn after start() since there is
unsynchronized access to l.conn in LDAPConnection.reader().

Since the reader isn't started yet, swap to manually writing the
StartTLS request and response.


I started this fix in 2015 and only yesterday got around to finishing it...

Delay starting until after the StartTLS handshake as otherwise
LDAPConnection.reader() can "steal" reads during the TLS handshake.
Also, it's not safe to change l.conn after start() since there is
unsynchronized access to l.conn in LDAPConnection.reader().

Since the reader isn't started yet, swap to manually writing the
StartTLS request and response.
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