2022-09-14 |
Clean up top-level build file and build options, fix build issues on MinGW
Jamie Smith
authored
on 3 Apr 2022
Jay Sridharan
committed
on 14 Sep 2022
|
2022-05-24 |
Mbed TLS: Fix wrong MPI N in ECP Curve448 curve
...
In loading Curve448, MPI N is in uninitialized state and its sign flag N.s isn't initialized to 1.
This is fixed by following:
https://github.com/Mbed-TLS/mbedtls/pull/5811
Chun-Chieh Li
committed
on 24 May 2022
|
2022-04-08 |
Mbed TLS: Fix compile error with ECP alternative
...
Fix un-paired parenthesis when MBEDTLS_ECP_RANDOMIZE_MXZ_ALT is enabled
Chun-Chieh Li
committed
on 8 Apr 2022
|
2021-09-20 |
CMake: connectivity: Guard unit test directories
...
When unit tests or unit test stubs get added as CMake targets, they
becomes part of the "all" target and get compiled when building the
whole project. When building greentea tests we need to disable unit
tests and stubs to avoid unnecessary compilation and errors.
Lingkai Dong
committed
on 20 Sep 2021
|
2021-07-12 |
CMake: Limit the mbed-stubs-mbedtls to required dependency mocks
Rajkumar Kanagaraj
committed
on 12 Jul 2021
|
CMake: Move mbedtls stub headers to the mbedtls doubles dir
...
Previously all the mbedtls stubs headers under mbed-stubs-headers,
so this PR move all mbedtls stubs headers under
mbedtls/tests/UNITTESTS/double directory and update CMake to include
stubs headers into mbed-stubs-mbedtls library to make mbedtls stubs
to be self-contained.
Rajkumar Kanagaraj
committed
on 12 Jul 2021
|
CMake: Update netsocket, lorawan unittest to use mbed-stubs-mbedtls
...
Update netsocket and lorawan unit tests to link with a mbed-stubs-mbedtls
library that it depends on instead of link with mbed-stubs
which is a group of stubs libraries.
Rajkumar Kanagaraj
committed
on 12 Jul 2021
|
CMake: Move mbedtls stubs to the mbedtls dir
...
Move the connectivity mbedtls stubs into the connectivity/mbedtls
component directory. So we can avoid duplicating the mbed-os source
tree in a central UNITTESTS folder.
Rajkumar Kanagaraj
committed
on 12 Jul 2021
|
2021-06-30 |
Merge pull request #14815 from LDong-Arm/test_psa_k64f_k66f
...
Enable PSA tests on K64F/K66F and fix missing PSA Crypto init in TLSSocketWrapper
Jaeden Amero
authored
on 30 Jun 2021
GitHub
committed
on 30 Jun 2021
|
2021-06-29 |
CMake: Require TEST_SOURCES in greentea CMake file
...
Assumption that greentea test file is always named main.cpp is
incorrect. Updated mbed_greentea_add_test() macro to make TEST_SOURCES
parameter compulsory, which is used to specify greentea test
file(s). This allows tests to use C, or have a different name.
Therefore also updated all pre-existing greentea test CMake files to
explicity add main.cpp to TEST_SOURCES.
Hari Limaye
committed
on 29 Jun 2021
|
2021-06-28 |
platform_mbed.h: Fix and align EXPERIMENTAL_API check
...
Some of the lines in `platform_mbed.h` only have `FEATURE_PSA`
checked, which is always set for Mbed OS PSA targets but the PSA
APIs are not actually available unless `FEATURE_EXPERIMENTAL_API`
is also enabled. To fix this and improve readability, group all
PSA-related lines and check both macros.
Lingkai Dong
committed
on 28 Jun 2021
|
2021-06-15 |
Merge pull request #14772 from LDong-Arm/mbedtls_timing
...
Improve implementation of Mbed TLS timing
Martin Kojtal
authored
on 15 Jun 2021
GitHub
committed
on 15 Jun 2021
|
Move Mbed TLS self tests to a separate configuration
...
We potentially save flash space by not enabling Mbed TLS self-tests
by default. A new test config file, TESTS/configs/mbedtls.json, is
provided to enable self tests. This newly created JSON file also
enables timing in Mbed TLS so timing gets tested.
Lingkai Dong
committed
on 15 Jun 2021
|
2021-06-14 |
mbedtls: Run mbedtls_timing_self_test if MBEDTLS_TIMING_C
...
This allows us to verify the support for Mbed TLS timing on Mbed OS.
Note: The macros MBEDTLS_TIMING_C and MBEDTLS_TIMING_ALT are not
enabled by default and need to be additionally enabled to run this
test.
Lingkai Dong
committed
on 14 Jun 2021
|
mbedtls: Use LowPowerTimeout for mbedtls_set_alarm() if available
...
The function `mbedtls_set_alarm()` is only precise to seconds, so
`LowPowerTimeout` is enough and saves power.
Lingkai Dong
committed
on 14 Jun 2021
|
timing_mbed.cpp: Check MBEDTLS_TIMING_ALT
...
Do not compile the Mbed implementation of Mbed TLS unless
MBEDTLS_TIMING_ALT is defined. This prevents a macro check error on
devices that do not have LPTICKER or USTICKER when Mbed TLS timing
is not enabled.
Lingkai Dong
committed
on 14 Jun 2021
|
mbedtls: Add full platform implementation of timing
...
When MBEDTLS_TIMING_C and MBEDTLS_TIMING_ALT are enabled,
the Arm Compiler generates errors like the following (one for
each missing symbol):
Error: L6218E: Undefined symbol mbedtls_timing_get_delay
Reason:
The function `mbedtls_timing_self_test()` in the Mbed TLS default
`timing.c` always gets compiled, if MBEDTLS_SELF_TEST is defined.
And MBEDTLS_SELF_TEST is always defined, as we have a Greentea test
to run some of the Mbed TLS self tests. (In the future we should try
not to enable MBEDTLS_SELF_TEST except for tests, but it requires
a rework in our test flow.)
`mbedtls_timing_self_test()` tests (calls) the full API declared in
`timing.h`, and the ARM Compiler requires all symbols referenced by
all functions to be defined, even those not used by the final
application. This is unlike GCC_ARM which resolves what are required.
Solution:
To fix the "undefined symbol" errors, we add an implementation of
`mbedtls_timing_get_timer()` based on Mbed OS `LowPowerTimer` or
`Timer` (depending on which one is available), and copy Mbed TLS's
default `mbedtls_timing_set_delay()` and `mbedtls_timing_get_delay()`
which are built on top of `mbedtls_timing_get_timer()`. This will also
benefit user applications that need to enable timing in Mbed TLS.
Lingkai Dong
committed
on 14 Jun 2021
|
mbedtls: Use LowPowerTimer/Timer for timing
...
Previously we used `gettimeofday()` for Mbed TLS timing, but its
implementation provided by Mbed OS is only precise to seconds. The
microsecond component of the output `struct timeval` is always set
to zero. But Mbed TLS requires millisecond precision.
To provide required timing precision, switch to use `LowPowerTicker`
or (microsecond) `Ticker`. `LowPowerTicker` is preferred as it saves
power and Mbed TLS does not require microsecond precision.
Lingkai Dong
committed
on 14 Jun 2021
|
Merge pull request #14741 from boraozgen/trng-def-checks
...
MbedTLS: Add definition checks for TRNG
Martin Kojtal
authored
on 14 Jun 2021
GitHub
committed
on 14 Jun 2021
|
2021-06-10 |
mbedtls: Rename Mbed timing implementation
...
We get a linker warning with the recently added timing module
implementation for Mbed. This is because there is Mbed TLS also ships a
file called timing.c, which we are including in Mbed OS also. With CLI
1, we get an error about unique object files because of the similarly
named implementation files.
Object file timing.o is not unique! It could be made from: mbed-os/connectivity/mbedtls/source/timing.c mbed-os/connectivity/mbedtls/platform/src/timing.cpp
Rename the Mbed timing module implementation to timing_mbed.cpp to avoid
this naming conflict.
Fixes: b8781e527bc1 ("mbedtls: Add an alt implementation of timing")
Fixes #14759
Jaeden Amero
committed
on 10 Jun 2021
|
2021-06-09 |
mbedtls: Add an alt implementation of timing
...
Implement the MBEDTLS_TIMING_ALT interface for Mbed OS. This
implementation is sufficient to run the Mbed TLS benchmarking
application.
Jaeden Amero
committed
on 9 Jun 2021
|
2021-06-07 |
MbedTLS: Add definition checks for TRNG
...
The compiler gave redefinition warnings if
MBEDTLS_ENTROPY_HARDWARE_ALT is defined in the the compile
definitions. A check is added to prevent this warning.
Bora Özgen
committed
on 7 Jun 2021
|
2021-05-31 |
Merge pull request #14652 from Patater/upgrade-mbedtls-2.25.0
...
tls: Upgrade to Mbed TLS v2.25.0
Martin Kojtal
authored
on 31 May 2021
GitHub
committed
on 31 May 2021
|
2021-05-14 |
tls: Add fix for Mbed TLS configuration issue
...
Until we have a fix for https://github.com/ARMmbed/mbedtls/issues/4512,
we need to patch the fix during import time. Otherwise, we run into
linker errors when PSA attempts to use RSA key generation, which we've
excluded.
This patch is extracted from
https://github.com/ARMmbed/mbedtls/pull/4513
Jaeden Amero
committed
on 14 May 2021
|
2021-05-12 |
tls: Upgrade to Mbed TLS v2.25.0
Jaeden Amero
committed
on 12 May 2021
|
2021-05-04 |
mbedtls: Don't attempt to use default_random_seed
...
Don't attempt to use default_random_seed unless both PSA and Experimental API
support are enabled. This prevents errors when the Mbed TLS NV Seed feature is
being used on platforms that have PSA enabled by default, but not Experimental
API support by default.
[DEBUG] Output: compilation terminated.
[ERROR] In file included from ./mbed-os/connectivity/mbedtls/include/mbedtls/config.h:31,
from ./mbed-os/connectivity/mbedtls/include/mbedtls/entropy.h:28,
./mbed-os/connectivity/mbedtls/platform/inc/platform_mbed.h:26:10: fatal error: default_random_seed.h: No such file or directory
26 | #include "default_random_seed.h"
Jaeden Amero
committed
on 4 May 2021
|
2021-04-15 |
CMake: Fix Mbed TLS compilation for Cortex-M0/0+/1/M23
...
Due to a known issue in Mbed TLS's architecture determination
(ARMmbed/mbedtls#1077), we get the error
error: inline assembly requires more registers than available
when compiling `bignum.c` for Cortex-M0/0+/1/M23 which do not have
the macro `__thumb2__` set by the compiler.
The workaround is to define the macro `MULADDC_CANNOT_USE_R7` which
is already defined by Mbed CLI 1 but missing in our CMake support.
Fixes ARMmbed/mbed-os-example-lorawan#220
Lingkai Dong
committed
on 15 Apr 2021
|
2021-02-25 |
Mbed TLS importer: don't import unnecessary files
...
The Mbed TLS importer accidentally imports Makefile and .gitignore
from Mbed TLS's `library/` directory. This commit restricts the
pattern to .h and .c files only, and removes the unnecessary files.
Lingkai Dong
committed
on 25 Feb 2021
|
Update .gitignore for Mbed TLS importer
...
The directory `mbed-tls-lib` previously in `.gitignore` no longer
exists. Instead, we can simply ignore the entire TARGET_IGNORE.
Lingkai Dong
committed
on 25 Feb 2021
|
Import mbedtls-2.24 and Mbed PSA Service (non-TFM)
...
Files have been automatically imported by setting MBED_TLS_RELEASE to
mbedtls-2.24.0 in connectivity/mbedtls/tools/importer/Makefile and
running `make` in that directory.
Lingkai Dong
committed
on 25 Feb 2021
|