Valerio Setti
c6240f751e
test_suite_debug: add USE_PSA_INIT/DONE guards in tests
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-23 10:47:58 +02:00
Manuel Pégourié-Gonnard
c1f78a2827
Merge pull request #7635 from AndrzejKurek/fix-bad-keyfile-prereqs-2-28
...
[2.28 backport] Fix bad keyfile prereqs
2023-05-23 09:27:32 +02:00
Gilles Peskine
a4a73b8ee3
Merge pull request #7632 from davidhorstmann-arm/2.28-demo-out-of-tree
...
[Backport 2.28] Fix demo scripts for out-of-tree builds
2023-05-22 17:23:51 +02:00
Aaron M. Ucko
82e06cb7bc
mbedtls/platform.h: Avoid potential macro redefinition warnings.
...
Some identifiers (e.g. mbedtls_free) can name either functions or
macros depending on configuration settings. For those that turn out
to name macros, first clear out any existing macro definitions to
accommodate possible unconditional bulk symbol renaming. (There
remains no standard provision for such renaming, but it's nevertheless
straightforward enough to do as desired, particularly with this change
in place.)
Signed-off-by: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
2023-05-22 10:07:17 -04:00
Andrzej Kurek
8985146f03
Fix wrong makefile target
...
Missing tab and a prerequisite that's not a file
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-05-22 09:48:30 -04:00
David Horstmann
39aee1214a
Fix demo scripts for out-of-tree builds
...
Allow demo scripts to be run from the build directory for out-of-tree
builds.
If the executable is not found in the source tree then search in the
current directory in case the script is being run from a build
directory.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-05-22 12:23:59 +01:00
Dave Rodgman
247e6f088d
Merge pull request #7608 from daverodgman/pr6511-2.28
...
Fix: no newline when debug msg over DEBUG_BUF_SIZE - backport 2.28
2023-05-17 17:59:54 +01:00
Gilles Peskine
2710fe2d5e
Merge pull request #7571 from bharsaklemukesh975/update-pkparse-tests-to-use-AES-2.28
...
Backport 2.28: Updating test-ca.key to use AES instead of DES
2023-05-16 19:15:11 +02:00
Gilles Peskine
4aff7dbc89
Merge pull request #7597 from daverodgman/pr4990-2.28
...
Replace references to Mbed Crypto (rebase) - backport 2.28
2023-05-16 19:15:00 +02:00
Dave Rodgman
bd77182063
Make use of MBEDTLS_STATIC_ASSERT
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-16 16:47:09 +01:00
Dave Rodgman
001917898f
Document minimum size for DEBUG_BUF_SIZE
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-16 16:47:09 +01:00
valord577
0d87d90cea
simplify code
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:47:09 +01:00
valord577
de6ea9847d
code style
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:47:09 +01:00
valord577
06b0bb55e3
make code readable and change var name
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:47:09 +01:00
valord577
e3623920cf
send debug msg if contains '\n'
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:47:09 +01:00
Dave Rodgman
40fe1cd364
Update library/debug.c
...
Fix trailing white-space
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-05-16 16:47:09 +01:00
valord577
afbaac29e8
Fix: no newline when debug msg over DEBUG_BUF_SIZE
...
Signed-off-by: valord577 <valord577@gmail.com>
2023-05-16 16:47:09 +01:00
Fredrik Hesse
6f665a56d0
Minor adjustments after review.
...
Signed-off-by: Fredrik Hesse <fredrik@hesse.se>
2023-05-15 15:28:46 +01:00
Fredrik Hesse
02501f6ba1
Replace references to Mbed Crypto with Mbed TLS through-out documentation and comments.
...
Signed-off-by: Fredrik Hesse <fredrik@hesse.se>
2023-05-15 15:28:39 +01:00
Fredrik Hesse
5b673a828d
Replace references to Mbed Crypto with Mbed TLS through-out documentation and comments.
...
Signed-off-by: Fredrik Hesse <fredrik@hesse.se>
2023-05-15 15:27:54 +01:00
Paul Elliott
9febc989c7
Merge pull request #7587 from gilles-peskine-arm/gitignore-objects-at-root-2.28
...
Backport 2.28: Ignore *.o everywhere
2023-05-15 13:57:12 +01:00
Gilles Peskine
e32e447407
Ignore *.o everywhere
...
We don't commit *.o files anywhere, not even as test data. So ignore them
everywhere.
Also remove a redundant ignore of *.exe in a subdirectory.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-05-12 13:57:39 +02:00
Mukesh Bharsakle
2599a71c74
updating test-ca.key to use AES instead of DES
2023-05-10 12:12:40 +01:00
Gilles Peskine
a8b3d0c7a2
Merge pull request #7553 from davidhorstmann-arm/2.28-remove-doxygen-mainpage-content
...
[Backport 2.28] Remove API docs mainpage content
2023-05-07 20:35:31 +02:00
David Horstmann
73474ed121
Minor cosmetic changes
...
* Change "source code documentation" to "API documentation" for
precision
* Change "mbed TLS" to "Mbed TLS" following established convention
* Use title case in the title
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-05-04 15:36:23 +01:00
David Horstmann
1ef4dc9df9
Update broken link to doxygen homepage
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-05-04 15:35:10 +01:00
David Horstmann
07b1cf91e1
Remove most of the doxygen mainpage
...
Since the API docs are now published as part of the larger
documentation, it makes no sense to give an overview of Mbed TLS in the
mainpage as this is already given elsewhere.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-05-04 15:35:08 +01:00
Dave Rodgman
2e4541f96f
Merge pull request #7545 from tom-cosgrove-arm/use-mbedtls_ct_uint_if-rather-than-mbedtls_ct_cond_select_sign-2.28
...
Backport 2.28: Use mbedtls_ct_uint_if() rather than mbedtls_ct_cond_select_sign()
2023-05-04 12:23:36 +01:00
Gilles Peskine
5ead738269
Merge pull request #7503 from gilles-peskine-arm/test-argument-types-union-2.28
...
Backport 2.28: Support larger integer test arguments
2023-05-04 10:05:25 +02:00
Paul Elliott
d7570a2a3b
Merge pull request #7536 from valeriosetti/issue7480-backport
...
Backport: Fix test gap in PK write: private (opaque) -> public
2023-05-03 17:08:43 +01:00
Tom Cosgrove
735d2c99e7
Backport 2.28: Use mbedtls_ct_uint_if() rather than mbedtls_ct_cond_select_sign()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-05-03 09:50:10 +01:00
Valerio Setti
0eace4128b
pk: fixing backport issues
...
Note: RSA is not supported in mbedtls-2.28 for opaque wrapping
so it was removed from test_suite_pkwrite.data.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:38:57 +02:00
Valerio Setti
974b816b3e
test: check for exact length of returned pub key
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:06:40 +02:00
Valerio Setti
3f8bf06534
test: optimize code for pk_write_public_from_private()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:06:39 +02:00
Valerio Setti
39a669433b
test: use better naming for the newly introduced test function
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:06:36 +02:00
Valerio Setti
5e7494ea75
pk: fix position for mbedtls_platform_zeroize
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:06:34 +02:00
Valerio Setti
b4468c45ac
test: fix makefile for ec_pub.[der/pem] generation
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:04:46 +02:00
Valerio Setti
50dacdfd34
test: fix wrong private key file
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:00:58 +02:00
Valerio Setti
7406e967f0
test: add test function for public key derivation starting from private one
...
Data test cases are also included in the commit.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:00:53 +02:00
Valerio Setti
aae96c9060
pk: fix: clear buffer holding raw EC private key on exit
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-05-02 16:00:45 +02:00
Manuel Pégourié-Gonnard
c69614bec0
Merge pull request #7505 from valeriosetti/issue7460-part1-backport
...
Backport: Fixing USE_PSA_INIT/DONE in SSL/X509/PK test suites
2023-05-02 10:44:15 +02:00
Gilles Peskine
dca0501089
Adjust code style for pointer types and casts
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-28 13:19:30 +02:00
Gilles Peskine
47903b17e9
typo
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-28 13:19:30 +02:00
Gilles Peskine
97f5cff2a2
Add test cases with a question mark
...
The test framework used to treat them specially (but no longer does). Add
these test cases as non-regression for how the test framework allows "?"
and especially "??" (which I think in the very distant path needed special
handling because the test data was embedded in a .c file, and thus ?? could
be interpreted as the prefix of a trigraph).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-28 13:19:30 +02:00
Gilles Peskine
5be40834e4
Fix wrong comment
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-28 13:19:30 +02:00
Gilles Peskine
f089972625
Explain the format argument expected by the test functions
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-28 13:19:30 +02:00
Gilles Peskine
c2fda4b7fb
Fix typos in test descriptions
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-28 13:19:30 +02:00
Gilles Peskine
c627917439
Test the line number returned by parse_test_data
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-28 13:19:30 +02:00
Gilles Peskine
f599ddfb43
Remove string hack for mbedtls_mpi_mod_int testing
...
Now that the test framework can pass arbitrary values of type
mbedtls_mpi_sint, just do that.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-28 13:19:30 +02:00
Gilles Peskine
ba72662730
Allow more signed integer types in test function arguments
...
Now that the C code supports the full range of intmax_t, allow any size of
signed integer type in the .data file parser.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-04-28 13:19:30 +02:00