TLS (std) example

Anybody know of any code showing how to use std’s TLS? For example if I wanted to establish a simple encrypted exchange between a client and a server (both in Zig)?

2 Likes

There is no server, yet.

To get a TLS client, call std.crypto.tls.Client.init
You need an inner stream, a std.crypto.Certificate.Bundle and the host name.

The only working example, I know, is the std.http.Client. To read the code start from connectTcp.

3 Likes

:sob: Ok, thanks for the info!

2 Likes