9457e67afd
update record size limit tests to be more consistent
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-01-10 16:17:28 +00:00
3a37756496
Improve record size limit tests
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-01-10 16:17:28 +00:00
598ea09dd5
TLS1.3: SRV/CLI: add support for sending Record Size Limit extension
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-01-10 16:17:27 +00:00
47d2946943
tls13: server: write Record Size Limit ext in EncryptedExtensions
...
- add the support in library
- update corresponding test cases.
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-01-10 16:17:27 +00:00
42017cd4c9
tls13: cli: write Record Size Limit ext in ClientHello
...
- add the support in library
- update corresponding test case
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
2024-01-10 16:17:27 +00:00
3eb9025275
Merge pull request #8680 from mpg/ciphers-wrapup
...
Driver-only ciphers wrapup
2024-01-10 12:04:50 +00:00
0710ac4ec8
Add ability to exclude mutex from tests
...
We need to be able to exclude mbedtls_test_info_mutex() from the normal
tests, as this mutex has to be locked to report mutex errors, and also
reports as leaked, due to where it is initialised / free'd.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-09 18:01:58 +00:00
65064265c2
Protect test info access with mutex
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-09 18:01:58 +00:00
c7a1e9936a
Move bignum flag for negative zero into test_info
...
Add accessors ready for protection with test_info mutex.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-09 18:01:58 +00:00
315c3ca9e5
Add required dependency to the testcase
...
Co-authored-by: Paul Elliott <62069445+paul-elliott-arm@users.noreply.github.com >
Signed-off-by: Jonathan Winzig <jwinzig@hilscher.com >
2024-01-09 18:31:11 +01:00
6c9779fabb
Remove unneeded testcase
...
Signed-off-by: Jonathan Winzig <jwinzig@hilscher.com >
2024-01-09 17:47:10 +01:00
a72454bc16
Update test-data to use SIZE_MAX
...
Co-authored-by: David Horstmann <david.horstmann@arm.com >
Signed-off-by: Jonathan Winzig <jwinzig@hilscher.com >
2024-01-09 17:39:42 +01:00
c5e77bf4e4
Add missing newline at the end of test_suite_x509write.data
...
Signed-off-by: Jonathan Winzig <jwinzig@hilscher.com >
2024-01-09 16:47:12 +01:00
3a6059beca
Merge pull request #7455 from KloolK/record-size-limit/comply-with-limit
...
Comply with the received Record Size Limit extension
2024-01-09 15:22:17 +00:00
2bd2b788cf
Add tests for Issue #8687
...
Signed-off-by: Jonathan Winzig <jwinzig@hilscher.com >
2024-01-09 15:19:42 +01:00
db6e02902d
test_suite_psa_crypto: test also MBEDTLS_ECP_DP_MAX in ecc_conversion_functions_fail()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
ac73952474
test_suite_psa_crypto: improve failing tests for EC conversion functions
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
4ba0c61eda
test_suite_psa_crypto: add test case for ECP conversion with null values
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
ad819679a5
test_suite_psa_crypto: explicitly check return values of conversion functions
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
bf999cb22e
test_suite_psa_crypto: add test functions and cases for ECC conversion functions
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
673868be5d
psa_crypto_ecp: add helper for checking EC parameters
...
This commit also updates "test_suite_psa_crypto.data" replacing
PSA_ERROR_NOT_SUPPORTED with PSA_ERROR_INVALID_ARGUMENT when
a wrong bit size is provided while importing key.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 13:41:52 +01:00
9b2d738ccd
Revert "test_suite_md: improve md_to_from_psa() test function and related data"
...
This reverts commit 2c1070b397
.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-09 08:41:21 +01:00
88bae8bc52
Rename tests components for clarity
...
All no_cipher components have crypto (as in libmbedcrypto.a), but the
difference is one doesn't have PSA crypto while the other two do.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2024-01-08 11:35:01 +01:00
7f48d5e203
Rename test components to better reflect content
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2024-01-08 11:35:01 +01:00
4aad0ff510
Merge pull request #8632 from valeriosetti/issue8598
...
[G5] Make block_cipher work with PSA
2024-01-08 08:07:53 +00:00
3dce2327ab
Use new thread abstraction for ctr_drbg tests
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:04:52 +00:00
3a4d2f14a8
Add test thread create/join abstraction
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:04:52 +00:00
17c119a5e3
Migrate to threading_helpers.h
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:04:52 +00:00
5c498f355d
Use mbedtls_test_info accessors internally as well
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 19:13:43 +00:00
4580d4d829
Add accessor helpers for mbedtls_test_info
...
Step one of being able to control access to mbedtls_test_info with
a mutex.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 19:13:43 +00:00
60f0f727c3
Add config dependencies to record size tests
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-01-04 14:57:31 +00:00
a021d63bf7
Merge pull request #8642 from daverodgman/default-compiler-all
...
CI perf: Use clang by default in all.sh
2024-01-04 12:58:54 +00:00
5bad043c06
Merge pull request #8641 from valeriosetti/issue8358
...
G3-G4 wrap-up
2024-01-04 10:48:00 +00:00
66b1ded73a
Merge pull request #8623 from daverodgman/verbatim-tfm
...
Use TF-M config verbatim
2024-01-04 08:08:06 +00:00
a10d112e45
Remove useless guards on MBEDTLS_BIGNUM_C
...
All of ECP requires the bignum module and there is no plan to change that,
so guarding a few bits of code is just noise.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-03 14:08:10 +01:00
1c91057fab
Update check_files.py to accomodate non-standard license headers in TF-M config files
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-03 11:10:18 +00:00
0ae58dd985
Unify MBEDTLS_TEST_OBJS
...
`$(MBEDTLS_TEST_OBJS)` included TLS-specific test support modules in
`tests/Makefile` but not in `programs/Makefile`. This difference is not
actually necessary. What is necessary is that all programs that use
functions from TLS-specific test support modules are linked with those
modules in addition to `-lmbedtls`, and programs that are not linked with
`-lmbedtls` are not linked with TLS-specific test support modules. Since we
always pass `-lmbedtls` when linking programs in `programs/Makefile`, we can
link with the TLS-specific test support modules as well. This keeps things
simpler.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-02 23:11:24 +01:00
570e54822c
Finish unifying LOCAL_CFLAGS
...
fixup "Create common.make with LOCAL_CFLAGS and friends"
The code wasn't what I had intended, although it was functionally
equivalent. Make it more readable and more robust.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-02 18:11:10 +01:00
5d867872dd
Improve readability of null-argument tests
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-01-02 17:57:51 +01:00
2c1070b397
test_suite_md: improve md_to_from_psa() test function and related data
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-02 14:58:22 +01:00
384fbde49a
library/tests: replace md_psa.h with psa_util.h as include file for MD conversion
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-02 13:27:32 +01:00
84125a167e
Merge remote-tracking branch 'origin/development' into default-compiler-all
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-01-02 11:42:38 +00:00
8c8b4da3a3
all.sh: keep PSA_WANT_ALG_[CCM/GCM] enabled in common_block_cipher_dispatch()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-02 11:44:30 +01:00
ea982e39a1
Merge pull request #8637 from bensze01/fix_supported_components
...
all.sh: Parse arguments before checking if a test is supported
2024-01-02 09:41:02 +00:00
3d46b7f81a
Fix Max fragmen length test to use TLS 1.2 maximum output size
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-01-01 20:50:53 +00:00
bae705c12b
Fix TLS 1.2 test to use TLS 1.2 maximum output size
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-01-01 14:21:21 +00:00
84d19e0836
all.sh: keep DES_C and CTR_DRBG_C enabled in test_full_no_cipher_with_crypto()
...
These were probably leftovers from the development phase of the
associated PR that were not removed in the end.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-12-29 16:42:21 +01:00
ea03183bd7
Adjust TLS 1.3 tests to new maximum output changes
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2023-12-29 15:36:51 +00:00
e581e140cc
oid/pkparse: add missing guards for PKCS[5/12] functions when !CIPHER_C
...
This commit also updates test_suite_pkparse.data file adding
MBEDTLS_CIPHER_C dependencies whenever PKCS[5/12] is used.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-12-29 16:35:58 +01:00
562dfe1067
all.sh: keep PKCS[5/12] enabled in full_no_cipher test components
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-12-29 16:34:19 +01:00