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

refactored zap.Tls

This commit is contained in:
Rene Schallner 2023-12-30 03:47:10 +01:00
parent c38856d0e1
commit 684ea8065b

View file

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