Skip to content

Commit 596c201

Browse files
committed
Also generate libssl source list
1 parent e30fe3c commit 596c201

4 files changed

Lines changed: 57 additions & 2 deletions

File tree

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub fn build(b: *std.Build) !void {
7272
const ssl_srcroot = upstream.path("ssl");
7373
libressl_common.libssl.root_module.addCSourceFiles(.{
7474
.root = ssl_srcroot,
75-
.files = libssl_sources,
75+
.files = &gen.libssl_sources,
7676
.flags = cflags,
7777
});
7878

generate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def getFileList(fileLists: dict, name: str, conditions: set[str]) -> list[str]:
6464
'libcrypto_la_SOURCES': None,
6565
'libcompat_la_SOURCES': None,
6666
'libtls_la_SOURCES': None,
67+
'libssl_la_SOURCES': None,
6768
}
6869

6970
# linux + glibc:
@@ -117,6 +118,7 @@ def getFileList(fileLists: dict, name: str, conditions: set[str]) -> list[str]:
117118
exported['libcompat_linux_musl'] = getFileList(fileLists, 'libcompat_la_SOURCES', linux_musl)
118119
exported['libtls_windows'] = getFileList(fileLists, 'libtls_la_SOURCES', windows)
119120
exported['libtls_unix'] = getFileList(fileLists, 'libtls_la_SOURCES', set())
121+
exported['libssl_sources'] = getFileList(fileLists, 'libssl_la_SOURCES', set())
120122

121123
for key, value in interest.items():
122124
if value is None:

generated.zig

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,59 @@ pub const libtls_unix = .{
935935
"tls_util.c",
936936
"tls_verify.c",
937937
};
938+
pub const libssl_sources = .{
939+
"bio_ssl.c",
940+
"d1_both.c",
941+
"d1_lib.c",
942+
"d1_pkt.c",
943+
"d1_srtp.c",
944+
"pqueue.c",
945+
"s3_cbc.c",
946+
"s3_lib.c",
947+
"ssl_asn1.c",
948+
"ssl_both.c",
949+
"ssl_cert.c",
950+
"ssl_ciph.c",
951+
"ssl_ciphers.c",
952+
"ssl_clnt.c",
953+
"ssl_err.c",
954+
"ssl_init.c",
955+
"ssl_kex.c",
956+
"ssl_lib.c",
957+
"ssl_methods.c",
958+
"ssl_packet.c",
959+
"ssl_pkt.c",
960+
"ssl_rsa.c",
961+
"ssl_seclevel.c",
962+
"ssl_sess.c",
963+
"ssl_sigalgs.c",
964+
"ssl_srvr.c",
965+
"ssl_stat.c",
966+
"ssl_tlsext.c",
967+
"ssl_transcript.c",
968+
"ssl_txt.c",
969+
"ssl_versions.c",
970+
"t1_enc.c",
971+
"t1_lib.c",
972+
"tls_buffer.c",
973+
"tls_content.c",
974+
"tls_key_share.c",
975+
"tls_lib.c",
976+
"tls12_key_schedule.c",
977+
"tls12_lib.c",
978+
"tls12_record_layer.c",
979+
"tls13_client.c",
980+
"tls13_error.c",
981+
"tls13_handshake.c",
982+
"tls13_handshake_msg.c",
983+
"tls13_key_schedule.c",
984+
"tls13_legacy.c",
985+
"tls13_lib.c",
986+
"tls13_quic.c",
987+
"tls13_record.c",
988+
"tls13_record_layer.c",
989+
"tls13_server.c",
990+
};
938991
pub const libcrypto_elf_armv4_asm = .{
939992
"aes/aes-elf-armv4.S",
940993
"bn/mont-elf-armv4.S",

update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ URL="https://github.com/libressl/portable/releases/download/v$VERSION/libressl-$
88
HASH=$(zig fetch $URL)
99
zig fetch --save=libressl $URL
1010

11-
cat zig-pkg/$HASH/{crypto,tls}/Makefile.am* | uv run generate.py | zig fmt --stdin > generated.zig
11+
cat zig-pkg/$HASH/{crypto,tls,ssl}/Makefile.am* | uv run generate.py | zig fmt --stdin > generated.zig

0 commit comments

Comments
 (0)