Gilles Peskine
f5d2d1c7cd
Skip dlopen demo in static builds
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 20:23:44 +02:00
Gilles Peskine
c25ae6f48c
Use demo_common.sh in dlopen test script
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 20:23:44 +02:00
Gilles Peskine
63c3534981
Pacify Pylint
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:35 +02:00
Gilles Peskine
2f8c545d3d
Make --quiet a little less quiet
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:35 +02:00
Gilles Peskine
1b01559fea
Error out if run from the wrong directory
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:35 +02:00
Gilles Peskine
9fdc657cbf
Add --quiet option to suppress demos' output
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:35 +02:00
Gilles Peskine
086f85f055
Fix some mistakes in descriptive messages
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:35 +02:00
Gilles Peskine
198d87ad52
Minor readability improvements
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:14 +02:00
Gilles Peskine
911081efd2
Explain why $root_dir needs a complicated calculation
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:14 +02:00
Gilles Peskine
fc09d27a92
Print only missing dependencies
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:14 +02:00
Gilles Peskine
c142620724
cleanup is part of the external interface
...
Since there's no EXIT trap in plain sh, the main script must call it
explicitly when it exits.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:14 +02:00
Gilles Peskine
82b2727e51
Run demo scripts in some builds
...
Run the sample program demo scripts in builds with a configuration
that is at least as complete as the default configuration.
Do not run sample programs in all configurations since they are
expected to fail if a required feature is missing.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:40:09 +02:00
Gilles Peskine
03be234c7f
Declare the dependencies of key_ladder_demo.sh
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:36:39 +02:00
Gilles Peskine
b2bcdc1c17
Let demo scripts declare their dependencies
...
Demo scripts should declare their build-time dependencies, to make
them more user-friendly. If a dependency is not met, users should see
an explicit message rather than an incomprehensible error.
Don't rely on the dependencies of individual programs because some
demo scripts use multiple programs and because some scripts might have
additional requirements.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:36:39 +02:00
Gilles Peskine
958be36b19
Demo scripts: create a seedfile if the configuration requires it
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:36:39 +02:00
Gilles Peskine
d1b5f6f609
Move common code of demo scripts into a library
...
The new file programs/demo_common.sh contains initialization code,
utility functions and cleanup code meant to be used by all demo
scripts written in sh.
Initial features:
* msg: Display a message.
* run, run_bad: Run a command, visibly.
* $root_dir, $programs_dir: location of the mbedtls source tree.
* $files_to_clean: files that are cleaned up on exit.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:36:13 +02:00
Gilles Peskine
2fcf04f468
Run demo scripts and check that they work
...
run_demos.py is the frontend to a framework for smoke-testing the
sample programs. It runs scripts called programs/*/*_demo.sh
("demo scripts") and check that they succeed. A typical demo script
runs one sample program or a combination of sample programs to
demonstrate their usage.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-25 19:31:43 +02:00
Tom Cosgrove
17526a0d16
Merge pull request #7906 from yanrayw/add-pake_guards_psa_crypto
...
PSA: add guards for PAKE getter functions
2023-07-24 15:59:28 +01:00
Gilles Peskine
5647d06be8
Merge pull request #7518 from gilles-peskine-arm/psa_inject_entropy-file-stability
...
Fix and test MBEDTLS_PSA_INJECT_ENTROPY
2023-07-21 17:37:15 +02:00
Ronald Cron
87f62850f3
Merge pull request #7893 from ronald-cron-arm/misc-from-psa-crypto
...
Miscellaneous fixes resulting from the work on PSA-Crypto
2023-07-21 10:54:41 +02:00
Gilles Peskine
c723e86e56
Fix copypasta in function documentation
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-07-20 17:54:19 +02:00
Dave Rodgman
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
Manuel Pégourié-Gonnard
c844c1a771
Merge pull request #7546 from mpg/align-psa-md-identifiers
...
Align psa md identifiers
2023-07-20 11:34:28 +02:00
Ronald Cron
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
Ronald Cron
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
Ronald Cron
7a93ac5308
all.sh: Use consistently CONFIG_H
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-07-20 10:02:32 +02:00
Ronald Cron
2b25d36165
Fix PSA crypto configuration file name
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2023-07-20 09:09:10 +02:00
Dave Rodgman
7fa27a1a18
Merge pull request #7960 from daverodgman/expect-fix
2023-07-19 19:48:15 +01:00
Dave Rodgman
e9fcffd089
Robustness fix to MBEDTLS_LIKELY
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-19 15:43:07 +01:00
Dave Rodgman
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
Dave Rodgman
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
Agathiyan Bragadeesh
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
Dave Rodgman
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
Dave Rodgman
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
Dave Rodgman
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
Agathiyan Bragadeesh
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
Gilles Peskine
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
Dave Rodgman
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
Manuel Pégourié-Gonnard
828b3acd6b
Merge pull request #7848 from valeriosetti/issue7749
...
driver-only ECC: EPCf.TLS testing
2023-07-18 10:33:21 +02:00
Agathiyan Bragadeesh
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
Agathiyan Bragadeesh
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
Agathiyan Bragadeesh
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
Agathiyan Bragadeesh
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
Tom Cosgrove
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
Agathiyan Bragadeesh
5058a5b5ad
Remove trailing whitespace bignum_core
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
2023-07-17 15:23:52 +01:00
Agathiyan Bragadeesh
e55a1e1cf4
Refactor preprocessing for arm none
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
2023-07-17 15:00:19 +01:00
Agathiyan Bragadeesh
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
Agathiyan Bragadeesh
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
Agathiyan Bragadeesh
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
Ronald Cron
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