Zig TLS client/server library

Zig TLS client/server library: tls.zig.

Characteristics:

  • TLS 1.2 and TLS 1.3 client
  • basic TLS 1.3 server
  • handles client authentication
  • options to select client cipher sites to use, named groups, …
  • share keys with Wireshark to show decrypted traffic
  • same performance as current standard library implementation
  • can be used with standard library http.Client (with modified std lib)

I noticed issues in Zig repo about missing TLS 1.2 in std lib so I tried to implement Zig TLS 1.2 client. After that, I add TLS 1.3 and then also TLS server. I tested implementation with a large list of top internet domains. When the library failed to connect to some domain I examined why and added the missing part. Now it connects to all of ~6k domains from the list.
Provides the same interface as net.Stream so can be easily used instead of plain TCP connection.

26 Likes

Looks very good - thanks very much for the in-depth readme!

1 Like

This couldn’t have come at a better time.

2 Likes

Welcome to Ziggit @ianic! Seems you’re off to a great start. :slight_smile:

2 Likes

Set up one of those tip me things. This is outstanding.

1 Like