Skip to content

Commit

Permalink
refactored zap.Tls
Browse files Browse the repository at this point in the history
  • Loading branch information
renerocksai committed Dec 30, 2023
1 parent 1061c2d commit 5770e16
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions examples/https/https.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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(.{
Expand Down

0 comments on commit 5770e16

Please sign in to comment.