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

Introduce TLSStream #154

Open
sergiu128 opened this issue Jan 13, 2025 · 0 comments
Open

Introduce TLSStream #154

sergiu128 opened this issue Jan 13, 2025 · 0 comments

Comments

@sergiu128
Copy link
Collaborator

sergiu128 commented Jan 13, 2025

To support TLS connections, we currently wrap the struct returned from tls.Dial into an AsyncAdapter. This is not ideal because:

  • TLS might need to also read on a write and vice versa depending on how renegotiation is setup (off by default). The async adapter might block if we must read on a write, since it only checks if a write is possible.
  • Calling asyncAdapter.Close() closes the TLS file descriptor, bypassing the closing handshake, which is incorrect. As such, users must invoked tlsConn.Close() and skip calling close on the async adapter, which is cumbersome.
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

No branches or pull requests

1 participant