65cd8519f7
For tests, rename ASSERT_COMPARE() to TEST_BUFFERS_EQUAL()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-07-20 16:51:15 +01:00
ed70fd0c39
Merge pull request #5549 from AndrzejKurek/doxygen-bad-param-names
...
Fix wrong doxygen parameter names and misused `\p` commands
2023-07-20 14:10:10 +01:00
c844c1a771
Merge pull request #7546 from mpg/align-psa-md-identifiers
...
Align psa md identifiers
2023-07-20 11:34:28 +02:00
7612d8c049
all.sh: Use consistently CONFIG_TEST_DRIVER_H
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-07-20 10:20:55 +02:00
6b49b55d6d
all.sh: Use consistently CRYPTO_CONFIG_H
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-07-20 10:02:59 +02:00
7a93ac5308
all.sh: Use consistently CONFIG_H
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-07-20 10:02:32 +02:00
2b25d36165
Fix PSA crypto configuration file name
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-07-20 09:09:10 +02:00
7fa27a1a18
Merge pull request #7960 from daverodgman/expect-fix
2023-07-19 19:48:15 +01:00
e9fcffd089
Robustness fix to MBEDTLS_LIKELY
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-07-19 15:43:07 +01:00
8e8e6b9be3
Merge pull request #7934 from AgathiyanB/move-declarations-to-top
...
Move declarations to top of functions
2023-07-19 15:25:27 +01:00
6dd40642e8
Merge pull request #7932 from AgathiyanB/add-mpi-uint-size-macro
...
Use compile-time determination of which __builtin_clz() to use, with new MBEDTLS_MPI_UINT_SIZE macro
2023-07-19 14:57:39 +01:00
708d78f80b
Improve & test legacy mbedtls_pkcs5_pbe2
...
* Prevent pkcs5_pbe2 encryption when PKCS7 padding has been
disabled since this not part of the specs.
* Allow decryption when PKCS7 padding is disabled for legacy
reasons, However, invalid padding is not checked.
* Add tests to check these scenarios. Test data has been
reused but with changing padding data in last block to
check for valid/invalid padding.
* Document new behaviour, known limitations and possible
security concerns.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2023-07-19 14:01:35 +01:00
eed55c6c94
Use defined macros for MBEDTLS_MPI_UINT_MAX
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-19 11:08:02 +01:00
9e8104cdd9
Merge pull request #7949 from AgathiyanB/IAR-asm-keyword
...
Use correct asm keyword for IAR compilers
2023-07-19 10:03:30 +01:00
131a22ef27
Merge pull request #7950 from AgathiyanB/fix-IAR-using-memset-s
...
Fix IAR trying to use memset_s in platform_util
2023-07-19 10:01:58 +01:00
8907815866
Added ChangeLog entry
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2023-07-18 18:29:46 +01:00
5f65acb02b
Merge pull request #7859 from gilles-peskine-arm/mbedtls_mpi-smaller
...
Reduce the size of mbedtls_mpi
2023-07-18 16:48:37 +01:00
46259f670f
Internal function mbedtls_mpi_zeroize() can be mbedtls_mpi_zeroize_and_free()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-07-18 16:44:14 +01:00
3a11bb8213
Better wording around passing NULL to mbedtls_zeroize_and_free()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-07-18 16:26:29 +01:00
789e50e5a0
Use correct asm keyword for IAR compilers
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-18 16:12:24 +01:00
209c9c9492
Bring code-style up-to-date
...
This PR was originally created before the code
style was changed. This commit updates the style.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2023-07-18 14:59:45 +01:00
f8b9ebf297
Add example program for PSA hash
...
This commit adds the example program for PSA
hash as well as the relevant changes to
CMakeLists.txt and the Makefile.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com >
2023-07-18 13:55:36 +01:00
24a305ec22
Explain why we check 65535 (not USHORT_MAX)
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-07-18 13:53:07 +02:00
b8f18850c6
Align ECP_MPI_INIT parameter order with mbedtls_mpi struct order
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-07-18 13:53:07 +02:00
dc28a5a105
Rename ASSERT_FALSE to TEST_FAIL
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-18 11:45:28 +01:00
ebb40bc336
Add ASSERT_FALSE macro for tests
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-18 11:38:04 +01:00
fb22c27f1d
Misc wording fixes and improvements
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-07-18 10:40:56 +02:00
828b3acd6b
Merge pull request #7848 from valeriosetti/issue7749
...
driver-only ECC: EPCf.TLS testing
2023-07-18 10:33:21 +02:00
74852038ee
Fix IAR trying to use memset_s in platform_util
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 18:35:30 +01:00
2d310deace
Add cast in test macros.h
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 18:27:03 +01:00
387bfa5b84
Add cast in psa_crypto
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 17:01:33 +01:00
4d47cea8f9
Move declarations in psa_crypto to top
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 16:58:44 +01:00
197565062a
Make consistent suffix MBEDTLS_MPI_UINT_MAX
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 16:43:19 +01:00
900e20d3a2
Change MBEDTLS_MPI_UINT_MAX suffix
...
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com >
Signed-off-by: Agathiyan Bragadeesh <48658345+AgathiyanB@users.noreply.github.com >
2023-07-17 16:27:21 +01:00
08b04b11ff
Merge pull request #7923 from gabor-mezei-arm/7598_fix_clone_of_ecp_module
...
[Bignum] Fixes for the ecp module cloning
2023-07-17 15:28:18 +01:00
5058a5b5ad
Remove trailing whitespace bignum_core
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 15:23:52 +01:00
ca8c61b815
Provide and use internal function mbedtls_zeroize_and_free()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-07-17 15:17:40 +01:00
10b6775aeb
Add enum type casts in lmots.c and lms.c
...
The IAR compiler throws an error when trying to assign an int to an enum
so these casts have been added.
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 15:14:42 +01:00
2f017a8356
Add enum casts in ssl_helpers.c
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 15:14:42 +01:00
01ed84a1f3
Add type casts in rsa.c
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 15:14:42 +01:00
be3ad4aed3
Add type casts in psa_exercise_key
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 15:14:42 +01:00
8b52b88b6d
Add type casts in ssl library
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 15:14:42 +01:00
e55a1e1cf4
Refactor preprocessing for arm none
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 15:00:19 +01:00
932126525a
Move declarations to top in ssl_helpers.c
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 12:21:06 +01:00
ec4c91ecc1
Move declaration in ecp_mod_koblitz to top
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 12:21:06 +01:00
c99840ae1f
Move declarations in mbedtls_mpi_add_abs to top
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com >
2023-07-17 12:21:06 +01:00
e501d0e71e
Add change log and non-regression test
...
Add change log and non-regression test
for CCM* with no tag not supported in
CCM only configuration.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-07-17 11:53:20 +02:00
170c199829
Align guards of Windows specific configuration checks
...
In check_config.h, align the guards of Windows
specific configuration checks with the ones used
in platform.h.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-07-17 11:53:20 +02:00
2e3795dc3c
tests: Fix header inclusion
...
When building tests, the path of the library
directory is part of the possible paths for
the includes thus no need to construct it
manually when including headers.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-07-17 11:52:32 +02:00
03ea8f8d0a
Add dependency of builtin CCM* on builtin cipher
...
Add missing dependency of the unauthenticated
cipher CCM* without tag builtin implementation
on builtin cipher.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-07-17 11:52:32 +02:00