Commit Graph

373 Commits

Author SHA1 Message Date
Ronald Cron
6924564970 Move back timing.c to mbedtls
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-12-04 14:25:02 +01:00
Ronald Cron
0381a98114 cmake: Move copy of crypto libraries to mbedtls
Move copy of crypto libraries to mbedtls as this
copy does not make sense in TF-PSA-Crypto context.
Also copy all of them, not just tfpsacrypto.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:28:27 +01:00
Ronald Cron
b7d0e52e16 cmake: Rename mbedcrypto target to tfpsacrypto
Rename mbedcrypto target to tfpsacrypto and
prefix all cmake related variables with
tfpsacrypto instead of mbedcrypto.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 09:28:27 +01:00
Ronald Cron
211bf6de21 cmake: Fix config files compile definitions
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-11-14 08:52:20 +01:00
Ronald Cron
50bd4f887e cmake: libs: Set libraries specific compile options target by target
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 18:09:40 +02:00
Ronald Cron
b2478989e2 cmake: GNU GCC: Set base compile options target by target
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 18:09:33 +02:00
Ronald Cron
5f6e69dae5
Merge pull request #9693 from Harry-Ramsey/split-revert-error-development
Split error.h and move back error.c to mbedtls
2024-10-25 13:12:58 +00:00
Ronald Cron
7b2fae2be9 cmake: Remove partial support for partial use CMake build system
Let the projects using some CMakeLists.txt files
without the top CMakeLists.txt define the variables
that the top CMakeLists.txt set for all.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-18 10:16:35 +02:00
Harry Ramsey
798d8b6533 Update build scripts for error.c generation
This commit updates the build scripts for error.c generation to be
generated in the Mbed TLS library directory.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-10-18 08:19:50 +01:00
Elena Uziunaite
09fee364a3 Adjust file path for generate_ssl_debug_helpers.py
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-10-15 11:43:51 +01:00
Harry Ramsey
468c0aede9 Revert move of version.h to tf-psa-crypto libray
This commit moves version.h back into /include/mbedtls from
tf-psa-crypto/drivers/builtin/include. This commit also changes the
necessary build files and scripts to generate version_features.c

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-10-04 13:37:42 +01:00
Ronald Cron
e82ad15f5e CMake: Move build of the crypto library to tf-psa-crypto
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-01 15:32:01 +02:00
Ronald Cron
ac01d6eb7c CMake: Move build of legacy crypto modules to tf-psa-crypto
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-01 15:32:01 +02:00
Ronald Cron
f8a3f28b6d CMake: Move library options to the top CMakeLists.txt
Move library options to the top CMakeLists.txt.
That way:
- we will be able to set the TF-PSA-Crypto
library options according to the Mbed TLS ones.
- we can define the crypto library target names
in the top CMakeLists.txt and not in the library
one that is dedicated to the TLS and x509
libraries now.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-01 15:32:01 +02:00
David Horstmann
7ba04a298c Bump version to 4.0.0
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-09-10 10:43:14 +02:00
Michael Schuster
1da4ed1df8 Move the -Wmissing-prototypes option from library/CMakeLists.txt to the top-level CMakeLists.txt for GCC & Clang
Signed-off-by: Michael Schuster <michael@schuster.ms>
2024-08-09 10:29:58 +01:00
Ronald Cron
aef8cf3b2e Adjust build systems
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-07-10 08:10:40 +02:00
Ronald Cron
c29afb684e Adjust build systems
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-07-10 08:07:38 +02:00
Ronald Cron
90ca4145cf Move crypto modules
Move all the modules that constitute
the crypto library as well as the
associated headers to tf-psa-crypto/core
for the PSA core modules and to
tf-psa-crypto/drivers/builtin/src for
the others.

The common.h file is copied instead of
being just moved as eventually they
will be different in mbedtls and
TF-PSA-Crypto. Some parts of it can be
shared though but this will be done later,
probably when adding the CMake build
system in tf-psa-crypto.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-10 08:07:34 +02:00
Ronald Cron
3d817add46 Adjust build systems
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-07-01 14:59:35 +02:00
Ronald Cron
f0481f562a
Merge pull request #9258 from tom-daubney-arm/drop_padlock_support
Drop support for VIA Padlock
2024-06-26 07:36:04 +00:00
Thomas Daubney
62af02c063 Drop support for VIA Padlock
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-06-14 10:37:13 +01:00
Ronald Cron
c7e9e367bb Adjust build systems
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-13 09:02:24 +02:00
Paul Elliott
30978ec650
Merge pull request #8874 from stevenwdv/development
Fix compilation on macOS without apple-clang
2024-03-29 13:59:36 +00:00
Minos Galanakis
4492dbd286 Version Bump for 3.6.0
./scripts/bump_version.sh --version 3.6.0 --so-crypto 16 --so-x509 7  --so-tls 21

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-22 11:46:25 +00:00
Steven WdV
9f0858db30 Check C/C++ compilers separately for AppleClang ranlib
Signed-off-by: Steven WdV <swdv@cs.ru.nl>
2024-03-19 11:39:44 +01:00
Valerio Setti
851f190da7 pk: move ECC setters to a separate file
- These functions are used both in pkparse.c for key parsing
  as well as pk.c for managing copy_from_psa(). As as consequence
  they should belong to pk.c, but that would make that module
  messier, so that's why a new separate module is added.
- Their guard can be changed from PKPARSE_C to PK_C.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-03-11 09:48:40 +01:00
Signed-off-by: Steven WdV
bcfed50917 Fix compilation on macOS without apple-clang
Signed-off-by: Steven WdV <swdv@cs.ru.nl>
2024-02-29 15:19:06 +01:00
Janos Follath
7a28738205
Merge pull request #8636 from paul-elliott-arm/new_test_thread_interface
New test thread interface
2024-02-08 12:35:40 +00:00
Paul Elliott
7fd162ec26 Refactor common PThreads CMake code
Move the flags and find of Threads to root CMakeLists.txt, rather
than duplicate these everywhere. Make explicit linking of library with
PThreads use the same mechanism.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-01-24 18:05:53 +00:00
Dave Rodgman
13f2f4e7f1 Merge remote-tracking branch 'restricted/development' into mbedtls-3.5.2rc 2024-01-24 09:49:15 +00:00
Dave Rodgman
e23d6479cc Bump version
./scripts/bump_version.sh --version 3.5.1

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-01-22 15:45:49 +00:00
Manuel Pégourié-Gonnard
21718769d1 Start adding internal module block_cipher.c
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-11-10 11:21:17 +01:00
Dave Rodgman
28d40930ae Restore bump version
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-08 11:40:08 +00:00
Dave Rodgman
47854e638b Revert back to v3.5.0
git revert v3.5.0..v3.5.1
git rebase to combine the resulting revert commits

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-08 11:38:57 +00:00
Dave Rodgman
bb5a18344a Bump version
./scripts/bump_version.sh --version 3.5.1 --so-crypto 15 --so-x509 6 --so-tls 20

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-03 12:31:30 +00:00
Minos Galanakis
e35e387ad7 Bump library so-crypto, so-x509, so-tls versions.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-10-04 16:17:46 +01:00
Minos Galanakis
8f4c19a680 Merge pull request #8273 from davidhorstmann-arm:target-prefix-3rdparty
Add MBEDTLS_TARGET_PREFIX to 3rdparty CMake
2023-10-04 16:03:22 +01:00
Minos Galanakis
31ca313efa Bump version to 3.5.0
```
./scripts/bump_version.sh --version 3.5.0
```

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-10-03 22:02:18 +01:00
David Horstmann
de527fbfe0 Add MBEDTLS_TARGET_PREFIX to 3rdparty CMake
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-28 18:39:33 +01:00
David Horstmann
b7b4f23c38 Add CMake include path for generated header
Now that we are generating psa_crypto_driver_wrappers.h, we need to pass
build/library as an include directory.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-09-27 14:05:32 +01:00
Xiaokang Qian
fe9666b8c0 Change the extension type of the file psa_crypto_driver_wrapper
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Xiaokang Qian
97d1ccb781 Dont't generate object file for file only include static functions
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Xiaokang Qian
e9c39c42fd Enable build of non-static psa wrapper functions
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-09-26 09:09:20 +00:00
Simon Butcher
e068aa7ad5 Fix the build for mingw and CMake + VStudio
Changes to the build to add the new Win32 Crypto API's inadvertently broke
the build for mingw and Visual Studio builds when generated by CMake.

Signed-off-by: Simon Butcher <simon.butcher@arm.com>
2023-09-25 14:12:20 +01:00
Gilles Peskine
e820c0abc8 Update spelling "mbed TLS" to "Mbed TLS"
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-12 19:18:17 +02:00
Gilles Peskine
d370f93898
Merge pull request #7898 from AndrzejKurek/csr-rfc822-dn
OPC UA - add support for RFC822 and DirectoryName SubjectAltNames when generating CSR's
2023-08-16 09:19:46 +00:00
Janos Follath
73568397a5
Merge pull request #8020 from yanesca/de-duplicate_ecp
De duplicate the ECP module
2023-08-04 08:27:09 +00:00
Dave Rodgman
a0fc9987da Merge branch 'development' into merge_3.4.1
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-03 15:56:59 +01:00
Janos Follath
d8cb3d7fa4 De-duplicate ecp.c
We duplicated ecp.c in the anticipation of heavy refactoring there. This
work has been suspended and the duplication is not useful anymore but
imposes an overhead.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-08-02 12:33:01 +01:00