mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 23:24:09 +00:00
refactored zap.Tls
This commit is contained in:
parent
1061c2d4ba
commit
5770e1673a
1 changed files with 5 additions and 6 deletions
|
@ -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(.{
|
||||||
|
|
Loading…
Add table
Reference in a new issue