apotocki/mbedtls 4.2.0 (r1, windows)
- Library
- mbedtls
- Variant
- windows, target windows
- Channel
- stable
- Published
- 2026-11-10
- Recipe source
- https://github.com/otok-dev/recipes.git
7387b6ee8dee98c91c576f3e39051559e5e83d83inrecipes/mbedtls/4.2/windows/ - Recipe SHA-256
ca807c1e99a265580ffa01631465a7458aa6a59f4bbb8bf1bf5fea54e5df6e43
Recipe files changed
Inputs
| source.sha256 | 2bed9d713b4668f76553b097e72b8aa30bc8f112a940d7ae228d524bbde6ffea |
|---|---|
| source.url | https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-4.2.0/mbedtls-4.2.0.tar.bz2 |
Platforms
windows
Toolchains
cmake { default-recipe = "apotocki/cmake", version = ">= 3.20" }ninja { default-recipe = "apotocki/ninja", version = ">= 1.10" }
Recipe files
build.lua
-- Mbed TLS's CMake project, the libraries only, with the default configuration (include/mbedtls/mbedtls_config.h and
-- TF-PSA-Crypto's include/psa/crypto_config.h). Python, which the project looks for only to check the configuration,
-- is not looked for: nothing of the machine.
function build(slice, options, deps)
local static = slice.linkage == "static"
otok.cmake{ defines = {
ENABLE_PROGRAMS = false, ENABLE_TESTING = false, GEN_FILES = false,
MBEDTLS_FATAL_WARNINGS = false, TF_PSA_CRYPTO_FATAL_WARNINGS = false,
USE_STATIC_MBEDTLS_LIBRARY = static, USE_SHARED_MBEDTLS_LIBRARY = not static,
USE_STATIC_TF_PSA_CRYPTO_LIBRARY = static, USE_SHARED_TF_PSA_CRYPTO_LIBRARY = not static,
CMAKE_DISABLE_FIND_PACKAGE_Python3 = true,
} }
local p = slice.prefix
-- tfpsacrypto.lib, mbedx509.lib, mbedtls.lib
local lib = function(name) return p .. "/lib/" .. name .. ".lib" end
return {
libraries = { mbedtls = lib("mbedtls"), mbedx509 = lib("mbedx509"), tfpsacrypto = lib("tfpsacrypto") },
headers = p .. "/include",
}
end
recipe.toml
# The otok recipe of Mbed TLS (https://github.com/apotocki/otok): libmbedtls, libmbedx509 and libtfpsacrypto (the
# PSA Cryptography API of TF-PSA-Crypto) for Windows, from the release archive, with Mbed TLS's CMake and its default
# configuration; static (Mbed TLS exports nothing from a DLL).
[recipe]
api = 1
library = "mbedtls"
name = "mbedtls"
version = "4.2.0"
revision = 1
license = "Apache-2.0 OR GPL-2.0-or-later"
license-files = ["LICENSE"]
homepage = "https://www.trustedfirmware.org/projects/mbed-tls/"
documentation = "https://mbed-tls.readthedocs.io"
description = "Mbed TLS, a small, portable implementation of TLS, DTLS, X.509 and the PSA Cryptography API."
keywords = ["tls", "ssl", "x509", "crypto", "cryptography", "psa"]
linkage = ["static"]
# The archive of the release, with TF-PSA-Crypto and the framework the git tag has as submodules, and the files its
# scripts generate; its SHA-256 is mbedtls-4.2.0-sha256sum.txt of the release.
[source]
url = "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-4.2.0/mbedtls-4.2.0.tar.bz2"
sha256 = "2bed9d713b4668f76553b097e72b8aa30bc8f112a940d7ae228d524bbde6ffea"
[platforms]
supported = ["windows"]
build-on = ["windows/msvc", "linux/clang-cl"]
[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }
[[product]]
name = "MbedTLS"
libraries = ["mbedtls", "mbedx509", "tfpsacrypto"]
link = { libraries = ["ws2_32", "bcrypt"] }