-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add Kernel TLS support to custom OpenSSL::BIO
#16646
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
Merged
straight-shoota
merged 10 commits into
crystal-lang:master
from
ysbaddaden:feature/add-ktls-support-to-openssl-bio
Feb 28, 2026
+941
−106
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ba133db
Add Crystal::EventLoop::Polling#recvmsg and #sendmsg (extension)
ysbaddaden 0763c70
Add support for KernelTLS to OpenSSL::BIO
ysbaddaden da2927c
Support Linux' TLS_TX_ZEROCOPY_RO socket setting
ysbaddaden 41320dd
Add OpenSSL::BIO#socket helper
ysbaddaden 9d9ea49
Fix: shut up typos (msg_controllen)
ysbaddaden 9bf8b8b
Merge branch 'master' into feature/add-ktls-support-to-openssl-bio
straight-shoota 7fd1192
Use Box to not cast Reference to Void*
ysbaddaden 9439a17
Extract crypto_info_len helper
ysbaddaden 5ae3e20
Link c/linux folder directly (not every individual file)
ysbaddaden 99a4ae9
Disable spec to workaround 'make: *** [Makefile:142: std_spec] Error 67'
ysbaddaden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| lib LibC | ||
| TCP_NODELAY = 1 | ||
| TCP_KEEPIDLE = 4 | ||
| TCP_KEEPINTVL = 5 | ||
| TCP_KEEPCNT = 6 | ||
| TCP_NODELAY = 1 | ||
| TCP_KEEPIDLE = 4 | ||
| TCP_KEEPINTVL = 5 | ||
| TCP_KEEPCNT = 6 | ||
| TCP_ULP = 31 | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| lib LibC | ||
| struct Iovec | ||
| iov_base : Void* | ||
| iov_len : SizeT | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| lib LibC | ||
| TCP_NODELAY = 1 | ||
| TCP_KEEPIDLE = 4 | ||
| TCP_KEEPINTVL = 5 | ||
| TCP_KEEPCNT = 6 | ||
| TCP_NODELAY = 1 | ||
| TCP_KEEPIDLE = 4 | ||
| TCP_KEEPINTVL = 5 | ||
| TCP_KEEPCNT = 6 | ||
| TCP_ULP = 31 | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| lib LibC | ||
| struct Iovec | ||
| iov_base : Void* | ||
| iov_len : SizeT | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| lib LibC | ||
| TCP_NODELAY = 1 | ||
| TCP_KEEPIDLE = 4 | ||
| TCP_KEEPINTVL = 5 | ||
| TCP_KEEPCNT = 6 | ||
| TCP_NODELAY = 1 | ||
| TCP_KEEPIDLE = 4 | ||
| TCP_KEEPINTVL = 5 | ||
| TCP_KEEPCNT = 6 | ||
| TCP_ULP = 31 | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| lib LibC | ||
| struct Iovec | ||
| iov_base : Void* | ||
| iov_len : SizeT | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| lib LibC | ||
| TCP_NODELAY = 1 | ||
| TCP_KEEPIDLE = 4 | ||
| TCP_KEEPINTVL = 5 | ||
| TCP_KEEPCNT = 6 | ||
| TCP_NODELAY = 1 | ||
| TCP_KEEPIDLE = 4 | ||
| TCP_KEEPINTVL = 5 | ||
| TCP_KEEPCNT = 6 | ||
| TCP_ULP = 31 | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| lib LibC | ||
| struct Iovec | ||
| iov_base : Void* | ||
| iov_len : SizeT | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| lib LibC | ||
| TCP_NODELAY = 1 | ||
| TCP_KEEPIDLE = 4 | ||
| TCP_KEEPINTVL = 5 | ||
| TCP_KEEPCNT = 6 | ||
| TCP_NODELAY = 1 | ||
| TCP_KEEPIDLE = 4 | ||
| TCP_KEEPINTVL = 5 | ||
| TCP_KEEPCNT = 6 | ||
| TCP_ULP = 31 | ||
| end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't pretty, but it at least allows to move on until we can figure out the issue on this specific msys2 environment. I cherry-picked the same commit to #16569 where the issue is also fixed.
It might be related to raising exceptions in
OpenSSL::BIOcallbacks from C.