aboutsummaryrefslogtreecommitdiff
path: root/3rdparty
AgeCommit message (Collapse)AuthorFilesLines
25 hoursMove everest and p256-mRonald Cron39-6746/+0
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
25 hoursAdjust build systemsRonald Cron2-2/+4
Adjust build systems such as we can built Mbed TLS in the default and full configuration. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
10 daysAdjust build systemsRonald Cron2-0/+2
Adjust build systems such as we can built Mbed TLS in the default and full configuration. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-13Adjust build systemsRonald Cron2-0/+2
Adjust build systems such as we can build Mbed TLS in the default and full configuration. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-12Add and update some .gitignore filesRonald Cron1-0/+1
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-01-24Fix Make issues with Everest enabledPaul Elliott2-7/+7
Apply Gilles suggestion to fix the problem with make on the CI when everest is enabled, i.e. use $(THIRDPARTY_DIR) instead of a fuzz specific hack involving $(THIRDPARTY_INCLUDES) Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-11-03Update license for p256-mDave Rodgman6-232/+6
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-13Fix 3rdparty/Makefile.inc when included recursivelyGilles Peskine1-1/+1
3rdparty/Makefile.inc could only be used when included from the primary makefile passed to make. It could not be used directly, or included from a makefile that is itself included. This was due to counting from the left of $(MAKEFILE_LIST) instead of using the last element. Since each include directive appends to $(MAKEFILE_LIST), when using it to determine $(THIRDPARTY_DIR), we need to use a simply-expanded variable. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-06Fix 3rdparty target names for custom configDavid Horstmann2-4/+4
Use the correct names qualified by MBEDTLS_TARGET_PREFIX. Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-10-04Merge pull request #8273 from davidhorstmann-arm:target-prefix-3rdpartyMinos Galanakis2-6/+10
Add MBEDTLS_TARGET_PREFIX to 3rdparty CMake
2023-10-02Add custom config logic to 3rdparty modulesDavid Horstmann2-0/+26
These do not link directly against Mbed TLS so need their own propagation of the custom config values through CMake. Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-09-29CMake: fix build with 3rdparty module enabled through a custom configGilles Peskine1-10/+2
Fixes #8165 Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-28Add MBEDTLS_TARGET_PREFIX to 3rdparty CMakeDavid Horstmann2-6/+10
MBEDTLS_TARGET_PREFIX is prepended to the CMake targets for Mbed TLS except for targets in 3rdparty. Change this so that 3rdparty targets use the prefix as well. This allows multiple copies of Mbed TLS to be used in the same CMake tree when using code in the 3rdparty directory. Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-09-26Change the extension type of the file psa_crypto_driver_wrapperXiaokang Qian1-2/+1
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Revert 3rd party p-256 entry fileXiaokang Qian1-0/+1
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Ensure build of P256 passXiaokang Qian1-0/+1
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26Define the psa wrapper functions as static inlineThomas Daubney1-1/+0
This is a commit from Thomas Daubney. Signed-off-by: Thomas Daubney <thomas.daubney@arm.com> Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-20Give a production-sounding name to the p256m optionGilles Peskine4-6/+6
Now that p256-m is officially a production feature and not just an example, give it a more suitable name. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-20Merge pull request #8041 from mpg/tfm-p256mManuel Pégourié-Gonnard4-66/+301
Test TF-M config with p256-m driver
2023-09-20Fix typo in variable declarationManuel Pégourié-Gonnard1-1/+1
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-20Fix documentation of error codesManuel Pégourié-Gonnard1-15/+24
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-20Improve comments on key formatsManuel Pégourié-Gonnard1-11/+9
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-20Improve return codeManuel Pégourié-Gonnard1-3/+3
CORRUPTION_DETECTED should be reserved for cases that are impossible, short of physical corruption during execution or a major bug in the code. We shouldn't use this for the kind of mistakes that can happen during configuration or integration, such as calling a driver on a key type that it doesn't support. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-18Fix some issues in commentsManuel Pégourié-Gonnard1-2/+2
Ranging from typos to outdated comment contradicting the code. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-13Merge pull request #8034 from gilles-peskine-arm/bump_version-doc_mainpageDave Rodgman6-6/+6
Update capitalization of "Mbed" and fix bump_version.sh
2023-09-12Update spelling "mbed TLS" to "Mbed TLS"Gilles Peskine6-6/+6
The official spelling of the trade mark changed from all-lowercase "mbed" to normal proper noun capitalization "Mbed" a few years ago. We've been using the new spelling in new text but still have the old spelling in a lot of text. This commit updates most occurrences of "mbed TLS": ``` sed -i -e 's/mbed TLS/Mbed TLS/g' $(git ls-files ':!ChangeLog' ':!tests/data_files/**' ':!tests/suites/*.data' ':!programs/x509/*' ':!configs/tfm*') ``` Justification for the omissions: * `ChangeLog`: historical text. * `test/data_files/**`, `tests/suites/*.data`, `programs/x509/*`: many occurrences are significant names in certificates and such. Changing the spelling would invalidate many signatures and tests. * `configs/tfm*`: this is an imported file. We'll follow the upstream updates. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-12Use macros for sizes in p256-m driverManuel Pégourié-Gonnard1-24/+34
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12Improve error codes in p256-m driverManuel Pégourié-Gonnard1-41/+36
Fix 19 out of 20 errors in test_suite_psa_crypto mentioned in the previous commit. The remaining error will be fix in the next commit. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12Add export_public_key entry point to p256-m driverManuel Pégourié-Gonnard2-0/+61
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12Add import_key entry point to p256-m driverManuel Pégourié-Gonnard2-0/+78
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12Add key management utilities to p256-mManuel Pégourié-Gonnard2-0/+84
Those will be needed in order for the driver to implement all the PSA key management entry points (currently only implements key generation). Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-06Use the zeroize function from Mbed TLSGilles Peskine1-6/+2
Keep using the upstream name, to minimize the differences with the upstream code. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-29Disable p256-m asm on aarch64Dave Rodgman1-1/+3
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-11p256m: minor fixes to the driver interfaceValerio Setti1-2/+2
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-06-15Add copyright (as agreed with Manuel)Dave Rodgman2-0/+2
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-12Ignore *.o everywhereGilles Peskine1-1/+0
We don't commit *.o files anywhere, not even as test data. So ignore them everywhere. This resolves *.o files not being ignored under 3rdparty/p256-m. Also remove a redundant ignore of *.exe in a subdirectory. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-28Minor changes to documentation and code comments for clarityAditya Deshpande3-14/+28
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Add support for building p256-m alongside Mbed TLS with CMake.Aditya Deshpande5-29/+48
Also check if p256-m is enabled in the config before including the contents of p256-m.c Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Migrate p256-m_driver_entrypoints.[hc] to new code styleAditya Deshpande2-58/+68
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Add warnings to documentation stating that p256-m code may be out of date ↵Aditya Deshpande2-2/+6
with upstream, plus other minor grammatical fixes. Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Use psa_generate_random() instead of mbedtls_ctr_dbrgAditya Deshpande1-23/+4
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Add SPDX license identifiers to driver entry point filesAditya Deshpande2-0/+40
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Add README and license from the p256-m repoAditya Deshpande2-0/+540
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Remove rand() from p256_generate_random() and move to an implementation ↵Aditya Deshpande2-6/+33
based on mbedtls_ctr_drbg Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Add README in p256-m/Aditya Deshpande1-0/+3
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Remove unnecessary no-check-names commentsAditya Deshpande1-4/+0
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Rename p256m to p256 for uniform function/macro prefixesAditya Deshpande2-16/+16
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-04-28Integrate p256-m as an example driver alongside Mbed TLS and write ↵Aditya Deshpande7-0/+2121
documentation for the example. (Reapplying changes as one commit on top of development post codestyle change instead of rewriting old branch) Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2023-01-11Rename VS2010 directory to VS2013 and update Makefiles etcDave Rodgman3-0/+0
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-09-15Include platform.h unconditionally: automatic partGilles Peskine1-5/+0
We used to include platform.h only when MBEDTLS_PLATFORM_C was enabled, and to define ad hoc replacements for mbedtls_xxx functions on a case-by-case basis when MBEDTLS_PLATFORM_C was disabled. The only reason for this complication was to allow building individual source modules without copying platform.h. This is not something we support or recommend anymore, so get rid of the complication: include platform.h unconditionally. There should be no change in behavior since just including the header should not change the behavior of a program. This commit replaces most occurrences of conditional inclusion of platform.h, using the following code: ``` perl -i -0777 -pe 's!#if.*\n#include "mbedtls/platform.h"\n(#else.*\n(#define (mbedtls|MBEDTLS)_.*\n|#include <(stdarg|stddef|stdio|stdlib|string|time)\.h>\n)*)?#endif.*!#include "mbedtls/platform.h"!mg' $(git grep -l '#include "mbedtls/platform.h"') ``` Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>