1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00

refactored zap.Tls

This commit is contained in:
Rene Schallner 2023-12-30 03:47:10 +01:00
parent 1061c2d4ba
commit 5770e1673a

View file

@ -44,12 +44,11 @@ pub fn main() !void {
help_and_exit(KEY_FILE, err);
};
const tls = try zap.Tls.init(
"localhost:4443",
CERT_FILE,
KEY_FILE,
null, // key file is not password-protected
);
const tls = try zap.Tls.init(.{
.server_name = "localhost:4443",
.public_certificate_file = CERT_FILE,
.private_key_file = KEY_FILE,
});
defer tls.deinit();
var listener = zap.SimpleHttpListener.init(.{