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.
This is upstream of tls.zig into the standard library.
I built that library when Zig std still had only tls 1.3 implementation.
There was a proposal to allow alternate tls implementation for std.http, when it is rejected, I decided to make this PR.
The standard library now has both 1.2 and 1.3 tls implemented which works fine for the main purpose; fetching packages. For building network services there will be more requirements, some of them already covered by tls.zig.
Differences with current:
has tls server
handles certificate request and client authentication
has better conformance; connect to more real world sites:
Testing with top 500 sites from tls-conformance project:
Using a larger domains list:
tested also with tlsfuzzer and badssl
Fixes: #22650, fixes: #21952, #fixes: #19521, fixes: #17446, fixes: #22508