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

alternate crypto.tls #23005

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

alternate crypto.tls #23005

wants to merge 3 commits into from

Conversation

ianic
Copy link
Contributor

@ianic ianic commented Feb 24, 2025

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:

    • current: 419/500 succeeded
    • v2: 463/500 succeeded

    Using a larger domains list:

    • current: 5598/6280 succeeded
    • v2: 6157/6280 succeeded
  • tested also with tlsfuzzer and badssl

Fixes: #22650, fixes: #21952, #fixes: #19521, fixes: #17446, fixes: #22508

Upstream of [tls.zig](https://github.com/ianic/tls.zig) into standard library.
Making default callback posix only.
@linusg
Copy link
Collaborator

linusg commented Feb 24, 2025

You included a file called connection.zig_ in this by accident.

Added by accident.
@ianic
Copy link
Contributor Author

ianic commented Feb 24, 2025

Uf, yes, my bad.
Thanks @linusg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment