David Horstmann
ef661c531f
Fix macro-spanning ifs in ecp.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-27 11:38:53 +01:00
David Horstmann
74ace59dc6
Fix macro-spanning ifs in ssl_srv.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-27 11:38:15 +01:00
Gilles Peskine
d654171087
Merge pull request #6477 from AndrzejKurek/fix-cipher-deps-2-28
...
[Backport 2.28] Fix PSA dependencies in test_suite_cipher.[aes|gcm|ccm]
2022-10-26 18:31:39 +02:00
Ronald Cron
2e0a11556e
Merge pull request #6483 from gilles-peskine-arm/psa-pkparse-pkwrite-2.28
...
Backport 2.28: PSA with RSA requires PK_WRITE and PK_PARSE
2022-10-26 14:57:41 +02:00
Ronald Cron
c527796ecb
Merge pull request #6392 from davidhorstmann-arm/2.28-fix-x509-get-name-cleanup
...
[Backport 2.28] Fix `mbedtls_x509_get_name()` cleanup
2022-10-26 14:28:04 +02:00
Gilles Peskine
031c8c2815
Add build with a typical configuration for a PSA crypto service
...
Disable non-crypto features that can't be called through the PSA API, as
well as algorithms that have no PSA interface.
This serves as a non-regression test for #6408 and #6409 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-25 21:09:49 +02:00
Gilles Peskine
c037ba9c3e
Add some missing dependencies on PKCS12 for encrypted keys
...
This is a PKCS#8 test case using a PKCS#12 algorithm.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-25 21:08:39 +02:00
Gilles Peskine
8df2748432
Improve test component name
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-25 20:32:35 +02:00
Gilles Peskine
21503df752
Add build with a typical configuration for a PSA crypto service
...
Disable non-crypto features that can't be called through the PSA API, as
well as algorithms that have no PSA interface.
This serves as a non-regression test for #6408 and #6409 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-25 20:32:20 +02:00
Gilles Peskine
8fb928f642
Fix PSA+RSA dependencies on PK
...
The PSA code needs pk_parse as well as pk_write for RSA keys. Fix #6409 .
This is independent of PKCS#1v1.5 support. Fix #6408 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-25 20:32:02 +02:00
Gilles Peskine
bfcf2d129d
test_suite_pk: Add missing dependencies on MBEDTLS_PEM_PARSE_C
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-25 20:08:38 +02:00
Gilles Peskine
8f3577a53d
test_suite_dhm: Add missing dependencies on MBEDTLS_PEM_PARSE_C
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-25 20:08:29 +02:00
Gilles Peskine
4e10fb2396
Add mbedtls_dhm_parse_dhmfile test case with DER input
...
dh.optlen.der is the result of converting dh.optlen.pem from PEM to DER.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-25 20:07:49 +02:00
David Horstmann
ee0a0e75c8
Fix macro-spanning ifs in ssl_cli.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 17:20:00 +01:00
David Horstmann
e9af9e3e12
Minor improvements to ecp.c changes
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:47:56 +01:00
David Horstmann
9430330d2f
Rename ARIA_SELF_TEST_IF_FAIL
...
Change to ARIA_SELF_TEST_ASSERT
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:47:56 +01:00
David Horstmann
864cc8dba2
Minor changes to asn1write.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:47:56 +01:00
David Horstmann
068a00baf1
Refactor macro-spanning if in ssl_server2.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:47:56 +01:00
David Horstmann
9e722ad97d
Refactor macro-spanning if in ssl_client2.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:47:56 +01:00
David Horstmann
d209197f37
Refactor macro-spanning ifs in ecdh.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:47:56 +01:00
David Horstmann
b95ee00244
Refactor macro-spanning ifs in ecp.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:47:56 +01:00
David Horstmann
863b17d0cc
Refactor macro-spanning if in asn1write.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:47:56 +01:00
David Horstmann
f3b1eaf95d
Refactor macro-spanning if in sha512.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:47:53 +01:00
David Horstmann
5846c9de19
Refactor macro-spanning if in ssl_msg.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:43:05 +01:00
David Horstmann
0bb7243425
Refactor macro-spanning if in ssl_tls12_client.c
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:39:26 +01:00
David Horstmann
75b1fe7199
Refactor ARIA_SELF_TEST_IF_FAIL macro
...
Change the ARIA_SELF_TEST_IF_FAIL macro to be more code-style friendly.
Currently it expands to the body of an if statement, which causes
problems for automatic brace-addition for if statements.
Convert the macro to a function-like macro that takes the condition as
an argument and expands to a full if statement inside a do {} while (0)
idiom.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-25 16:36:03 +01:00
Andrzej Kurek
84fc52c6b3
Formatting & cosmetic fixes
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-25 04:18:30 -04:00
David Horstmann
6c4226ce95
Change brace initialization to memset
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-24 15:30:30 +01:00
David Horstmann
8eb3ed56f8
Minor fixes to x509_get_name() test function
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-24 15:30:30 +01:00
David Horstmann
670a993dcd
Fix incorrect return style
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-24 15:30:30 +01:00
David Horstmann
e6917d05d3
Remove unnecessary NULL assignments
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-24 15:30:30 +01:00
David Horstmann
5ad5e1657d
Clarify wording on allocation
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-24 15:30:30 +01:00
David Horstmann
4a67c351a8
Improve X509 DN test naming
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-24 15:30:30 +01:00
David Horstmann
94cbd30a24
Add explanatory comments to raw DER test data
...
Break down the DER-encoded ASN.1 test data into its structure in a
comment and explain it, to make it easier to understand where the data
came from and how it is corrupted.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2022-10-24 15:30:28 +01:00
Andrzej Kurek
36b3b7cbee
Fix test dependencies for cases that are PSA-based
...
These should be using PSA-type macros, not MBEDTLS_XXX_C.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-24 05:40:55 -04:00
Andrzej Kurek
ed01319962
Add missing ECB requirements for PSA cipher aes tests
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-24 05:21:50 -04:00
Andrzej Kurek
0d3b3a86d2
Move MBEDTLS_ECP_C requirements to test_suite_ssl.function
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 14:50:35 -04:00
Andrzej Kurek
e470821e6a
Add missing SHA dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:46:16 -04:00
Andrzej Kurek
a2089f5a29
pylint: ignore duplicated imports
...
It is not uncommon to have the same imports
across different python files. Ignore it when
running pylint.
Starting at pylint 2.14.5 this is the default value.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:43:59 -04:00
Andrzej Kurek
3de1c783ea
Fix blowfish padding dependencies
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:43:55 -04:00
Andrzej Kurek
467a0f2025
Adjust depends.py to the 2.28 branch
...
SHA224 and SHA384 does not exist.
ARC4 and BLOWFISH requirements had to be added.
Changed mbedtls_config.h to config.h
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
15e5dd8d96
Add missing blowfish possibility to CBC suites
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
113952de01
depends.py: rename domains argument to tasks
...
Tasks can consist of domains and/or jobs.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
ffbc8f5d4a
depends.py documentation fixes
...
Now that the format of exclusive groups has been changed,
update the documentation using it too.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
96298f960f
Add a temporary solution to create a seedfile
...
This caused problems if a config with SHA512 was
compiled after a config without it and the seedfile
did not contain enough data.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
3146bb4f61
depends.py: remove config options that are unset anyway
...
Over the lifespan of this script these options have been removed
from the "full" configuration.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
bec35a18c1
depends.py: rename config_pl usage to config_py
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:38:12 -04:00
Andrzej Kurek
9cbdf102d6
Change the way exclusive groups are defined in depends.py
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:37:00 -04:00
Andrzej Kurek
0325ced8cc
depends.py: fix TLS 1.3 requirements
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:37:00 -04:00
Andrzej Kurek
8b7a157fbe
Improve depends.py readability
...
Switch from SHA224 & SHA384 testing to SHA256 and SHA512.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-10-20 06:37:00 -04:00