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:
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);
|
||||
};
|
||||
|
||||
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(.{
|
||||
|
|
Loading…
Add table
Reference in a new issue