Skip to content

Commit

Permalink
Use libreSSL instead of openSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
agagniere committed Oct 11, 2024
1 parent 40f83ac commit 036533a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ pub fn build(b: *std.Build) !void {
}

if (!disable_ssl) {
if (b.lazyDependency("openssl", .{ .target = target, .optimize = optimize })) |openssl_dep| {
const openssl = openssl_dep.artifact("openssl");
if (b.lazyDependency("libressl", .{ .target = target, .optimize = optimize })) |openssl_dep| {
const openssl = openssl_dep.artifact("ssl");
lib.linkLibrary(openssl);
}
lib.addCSourceFiles(.{
Expand Down Expand Up @@ -112,9 +112,9 @@ pub fn build(b: *std.Build) !void {
.HAVE_LIBCRYPTO = usessl,
.HAVE_LIBSSL = usessl,
.HAVE_OPENSSL_INIT_SSL = usessl,
.HAVE_SSL_CTX_SET_CERT_CB = usessl,
.HAVE_SSL_CTX_SET_CERT_CB = null,
.HAVE_SSL_CTX_SET_NUM_TICKETS = usessl,
.HAVE_X509_GET_SIGNATURE_INFO = usessl,
.HAVE_X509_GET_SIGNATURE_INFO = null,
.HAVE_X509_GET_SIGNATURE_NID = usessl,
.HAVE_BIO_METH_NEW = usessl,
.HAVE_HMAC_CTX_FREE = usessl,
Expand Down
5 changes: 5 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
.hash = "12200078346510dd1010ac11cf1d46b0e51cda1b3c80f3b2fb375194f52f70cbf0a0",
.lazy = true,
},
.libressl = .{
.url = "git+https://github.com/allyourcodebase/libressl?ref=3.9.2#a373b82991947b694196ee630bd6a648d71e2b3f",
.hash = "1220b1536d43ed8ce79ee05c53929f90b67dd299e61dfa249fa8f476f17eee46a95f",
.lazy = true,
},
.zlib = .{
.url = "git+https://github.com/allyourcodebase/zlib?ref=1.3.1#0918e87b7629b9c6a50a08edd0ce30d849758faf",
.hash = "122034ab2a12adf8016ffa76e48b4be3245ffd305193edba4d83058adbcfa749c107",
Expand Down

0 comments on commit 036533a

Please sign in to comment.