1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 17:25:09 +00:00
serenity/Meta/gn/secondary/Userland/Libraries/LibTLS/BUILD.gn
2023-12-14 08:36:25 -07:00

43 lines
1.1 KiB
Text

import("//Meta/gn/build/download_cache.gni")
import("//Meta/gn/build/download_file.gni")
declare_args() {
# If true, Download root CA certificate bundle from curl.se
# Data will be downloaded to $cache_path/CACERT and used by LibTLS
enable_cacert_download = true
}
cacert_cache = cache_path + "CACERT/"
if (enable_cacert_download) {
download_file("ca_certificates_download") {
version = "2023-12-12"
url = "https://curl.se/ca/cacert-$version.pem"
output = "$root_build_dir/cacert.pem"
version_file = cacert_cache + "version.txt"
}
# FIXME: Copy file to /etc/cacert.pem on serenity
}
shared_library("LibTLS") {
output_name = "tls"
include_dirs = [ "//Userland/Libraries" ]
cflags_cc = [ "-Wvla" ]
sources = [
"Certificate.cpp",
"Handshake.cpp",
"HandshakeCertificate.cpp",
"HandshakeClient.cpp",
"HandshakeServer.cpp",
"Record.cpp",
"Socket.cpp",
"TLSv12.cpp",
]
deps = [
":ca_certificates_download",
"//AK",
"//Userland/Libraries/LibCore",
"//Userland/Libraries/LibCrypto",
"//Userland/Libraries/LibFileSystem",
]
}