aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-01-17 14:51:26 +0000
committerKhem Raj <raj.khem@gmail.com>2023-01-17 08:27:45 -0800
commit8d64fcc825cbe3579b91cab5b32b2a01327021de (patch)
treec780147c9ce434bd59db57dc46cc34154e2f4b2a /meta-networking
parentc3f4c702aea64eecdf67f0af2ad22b9c3466f4e0 (diff)
downloadmeta-openembedded-8d64fcc825cbe3579b91cab5b32b2a01327021de.tar.gz
mbedtls: add option to use PSA for X.509/TLS operations
Add an option to use Platform Security Architecture for the X.509 and TLS operations. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.1.bb6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.1.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.1.bb
index 742414dd8a..b178f5785b 100644
--- a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.1.bb
+++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.1.bb
@@ -32,9 +32,15 @@ PACKAGECONFIG ??= "shared-libs programs"
PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-DUSE_SHARED_MBEDTLS_LIBRARY=OFF"
PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF"
PACKAGECONFIG[werror] = "-DMBEDTLS_FATAL_WARNINGS=ON,-DMBEDTLS_FATAL_WARNINGS=OFF"
+# Make X.509 and TLS calls use PSA
+# https://github.com/Mbed-TLS/mbedtls/blob/development/docs/use-psa-crypto.md
+PACKAGECONFIG[psa] = ""
EXTRA_OECMAKE = "-DENABLE_TESTING=OFF -DLIB_INSTALL_DIR:STRING=${libdir}"
+# For now the only way to enable PSA is to explicitly pass a -D via CFLAGS
+CFLAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'psa', ' -DMBEDTLS_USE_PSA_CRYPTO', '', d)}"
+
PROVIDES += "polarssl"
RPROVIDES:${PN} = "polarssl"