Otok public index

apotocki/mbedtls

apotocki/mbedtls 4.2.0 (r1, linux)

Library
mbedtls
Variant
linux, target linux
Channel
stable
Published
2026-11-10
Recipe source
https://github.com/otok-dev/recipes
7387b6ee8dee98c91c576f3e39051559e5e83d83 in recipes/mbedtls/4.2/linux/
Recipe SHA-256
f8cb279515c4eaaf92d44a6b07b58549603f165f871041eca8c277639691aab0

Recipe files changed

Inputs

source.sha2562bed9d713b4668f76553b097e72b8aa30bc8f112a940d7ae228d524bbde6ffea
source.urlhttps://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-4.2.0/mbedtls-4.2.0.tar.bz2

Platforms

linux

Toolchains

Recipe files

build.lua 1164 bytes · raw
-- 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
    -- libtfpsacrypto.a or libtfpsacrypto.so (with its links on Linux), and so on
    local lib = function(name) return p .. "/lib/lib" .. name .. (static and ".a" or ".so") end
    return {
        libraries = { mbedtls = lib("mbedtls"), mbedx509 = lib("mbedx509"), tfpsacrypto = lib("tfpsacrypto") },
        headers = p .. "/include",
    }
end
recipe.toml 1427 bytes · raw
# The otok recipe of Mbed TLS (https://github.com/apotocki/otok): libmbedtls, libmbedx509 and libtfpsacrypto (the
# PSA Cryptography API of TF-PSA-Crypto) for Linux, from the release archive, with Mbed TLS's CMake and its default
# configuration; static or dynamic.
[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", "dynamic"]

# 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 = ["linux"]
build-on = ["linux/gcc", "linux/clang"]

[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }

[[product]]
name = "MbedTLS"
libraries = ["mbedtls", "mbedx509", "tfpsacrypto"]