Skip to content
Commit f0ea13d2 authored by Paul Sokolovsky's avatar Paul Sokolovsky Committed by Anas Nashif
Browse files

ext: mbedtls: Don't define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS



That means that when mbedTLS will need functions like snprintf(),
printf(), a few others, they will be used from libc, as done
normally by most of software. Note that mentioned functions
aren't normally used on code paths doing TLS communication per se.
Instead, they are used by debug logging, additional "print info"
style functions, etc.

Before, when MBEDTLS_PLATFORM_NO_STD_FUNCTIONS was defined, those
functions were stubbed out, so silently didn't work as expected
(a specific symptom seen was that some debug messages were printed
as garbage, because an buffer on stack was passed to dummy snprintf
stub, which didn't do anything to it, and its uninitialized contents
were printed afterwards. Instead, the expectation was that an
application would call a "setter" function to set snprintf, etc.
implementations as provided by application itself.

For Zephyr, we clearly don't need to burden applications with such
setup, instead Zephyr, as an OS, provides integrated environment
were matters like that "just work". So, we just switch to libc-based
functions. If there ever will be usecases for
MBEDTLS_PLATFORM_NO_STD_FUNCTIONS, it can be made configurable later.

Fixes: #16303

Signed-off-by: default avatarPaul Sokolovsky <paul.sokolovsky@linaro.org>
parent 6b9e160b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment