Skip to content

TLS handshake timeout (Fix #37)#39

Merged
programatik29 merged 7 commits intoprogramatik29:masterfrom
finnbear:handshake-timeout
Mar 31, 2022
Merged

TLS handshake timeout (Fix #37)#39
programatik29 merged 7 commits intoprogramatik29:masterfrom
finnbear:handshake-timeout

Conversation

@finnbear
Copy link
Copy Markdown
Contributor

@finnbear finnbear commented Mar 11, 2022

This PR adds a timeout to the TLS handshake, to guard against TCP connection leaks arising from poor connections or malicious activity. This type of connection leak can seriously impair an internet-facing server (I know from experience). A test case is included to verify the functionality works.

The downside is that a https://docs.rs/tokio/latest/tokio/time/struct.Sleep.html is required per connection being accepted, which I believe is a heap allocation.

Please note: This PR is on top of my AddrIncomingConfig PR (#38), for my own convenience, so I can use both together until one or both are merged.

@finnbear finnbear changed the title Handshake timeout (Fix #37) TLS handshake timeout (Fix #37) Mar 11, 2022
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.

2 participants