32141 Commits

Author SHA1 Message Date
Harry Ramsey
b070eb6c52 Add test cases for AES GCM input and output buffer overlap
This commit adds test cases for input and output buffer overlap. The
data for the test cases is a duplicate of existing encrypt/decrypt test
cases.

The two test functions gcm_<encrypt/decrypt>_input_output_buffer_overlap
are modified to use a single malloc buffer rounded to the nearest
128-bits/16-bytes for input and output.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-11-04 11:02:29 +00:00
Chien Wong
ea2e5ebe4e Revert "Remove outdated doc on mbedtls_gcm_update()"
This reverts commit 0be523356005960e07ead277dbf5354823a4afae.

Signed-off-by: Chien Wong <m@xv97.com>
2024-11-04 11:02:29 +00:00
Chien Wong
c22de4aeba Revert "Clarify output_length in mbedtls_gcm_update()"
This reverts commit e01b539222d462cabc6ecc927f3d2eb1e7e18615.

Signed-off-by: Chien Wong <m@xv97.com>
2024-11-04 11:02:29 +00:00
Chien Wong
57739fffc4 Revert "Fix a grammar error"
This reverts commit f5773c5188cca4e9d1037501bb9ac3c918467812.

Signed-off-by: Chien Wong <m@xv97.com>
2024-11-04 11:02:29 +00:00
Chien Wong
e6d28c6048 Fix a grammar error
Signed-off-by: Chien Wong <m@xv97.com>
2024-11-04 11:02:29 +00:00
Chien Wong
591f98e039 Clarify output_length in mbedtls_gcm_update()
Signed-off-by: Chien Wong <m@xv97.com>
2024-11-04 11:02:29 +00:00
Chien Wong
2328f9ea9e Remove outdated doc on mbedtls_gcm_update()
Signed-off-by: Chien Wong <m@xv97.com>
2024-11-04 11:02:29 +00:00
Chien Wong
89bbc3a4c5 Fix doc on buffer requirements of GCM API
Signed-off-by: Chien Wong <m@xv97.com>
2024-11-04 11:02:29 +00:00
Manuel Pégourié-Gonnard
0b7faf9011
Merge pull request #9746 from gilles-peskine-arm/ffdh-memsan-skip-dev
Skip slowest FFDH tests against GnuTLS with MSan or Valgrind
2024-11-04 08:10:26 +00:00
Gilles Peskine
05030d4141 Skip slowest FFDH tests against GnuTLS with MSan or Valgrind
Skip 6144-bit and 8192-bit FFDH tests in MSan or Valgrind test
configurations. These test cases are slow and sometimes trigger GnuTLS's
built-in timeout (which cannot be configured until more recent versions).

Resolves #9742.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-10-31 18:52:40 +01:00
Bence Szépkúti
cd0fb1d178
Merge pull request #9105 from jetm/ssl-client2-get-req-host
ssl_client2: Add Host to HTTP GET request
2024-10-31 11:32:49 +00:00
Manuel Pégourié-Gonnard
467b487d95
Merge pull request #9738 from mpg/drop-armcc5-dev
[dev] Drop building with armcc5 in all.sh
2024-10-31 08:12:40 +00:00
Manuel Pégourié-Gonnard
69868299a8
Merge pull request #9430 from davidhorstmann-arm/align-development-3.6-test-helpers
Align development test helpers with 3.6
2024-10-30 09:09:34 +00:00
Bence Szépkúti
15baf8b027
Merge pull request #9708 from ronald-cron-arm/target-compile-options
cmake: Define compile and link options target by target
2024-10-29 18:59:07 +00:00
Gilles Peskine
8ed4d94166
Merge pull request #9614 from gilles-peskine-arm/use_psa_crypto-always_on
Always enable MBEDTLS_USE_PSA_CRYPTO in all.sh
2024-10-29 14:58:55 +00:00
Bence Szépkúti
d6175c5b0c
Merge pull request #9389 from bensze01/graviton-testing
Add default config tests for the A64, A32, Thumb 1 and Thumb 2 instruction sets
2024-10-29 12:24:48 +00:00
Manuel Pégourié-Gonnard
26caae8152 Rm forgotten armc5
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-10-29 12:43:26 +01:00
Manuel Pégourié-Gonnard
705690af69 Drop building with armcc5 in all.sh
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-10-29 11:46:47 +01:00
Bence Szépkúti
bc8c157bce Add override arguments for new gcc targets
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:16:17 +01:00
Bence Szépkúti
8490f052ae Clarify GCC version requirement
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:15:24 +01:00
Bence Szépkúti
479eb522d7 Split up the Thumb-1 test component
The Thumb-1 tests are by far the slowest, so split the -O0 and -Os tests
into their own components.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:15:24 +01:00
Bence Szépkúti
bb61245007 Remove superfluous invocations of make clean
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:15:24 +01:00
Bence Szépkúti
de146a13b4 Update component speed estimates
The estimates are based on the most recent CI run.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:15:24 +01:00
Bence Szépkúti
65e77c53d6 Initialize result caching variables
This prevents interference from identically named environment variables.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:15:22 +01:00
Bence Szépkúti
924662bea3 Use true/false in place of integers
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:14:32 +01:00
Bence Szépkúti
31906327d3 Ignore missing temporary files during cleanup
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:13:53 +01:00
Bence Szépkúti
c12ebb0811 Fix copypasta in gcc_version
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:13:25 +01:00
Bence Szépkúti
d1d26139ff Add AArch64 default config test
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:12:25 +01:00
Bence Szépkúti
1524b9c3ad Add Arm eabi default config tests
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2024-10-28 11:10:15 +01:00
David Horstmann
f8d13d8fad
Merge pull request #9721 from paul-elliott-arm/fix_new_coverity_issues
Fix new coverity issues
2024-10-25 16:43:37 +00:00
Ronald Cron
3e9cc2c213 key_ladder_demo: Initialize additional data to all zeroes
The header structure was initialized only field by
field. This does not initialized the padding bytes
and MemSan was complaining with use of
uninitialized data in test_memsan all.sh component.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 18:09:40 +02:00
Ronald Cron
50bd4f887e cmake: libs: Set libraries specific compile options target by target
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 18:09:40 +02:00
Ronald Cron
d093edd2bd cmake: tests: Set test specific compile options target by target
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 18:09:40 +02:00
Ronald Cron
051ee711bf Remove now unnecessary shared lib specific compile option
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 18:09:40 +02:00
Ronald Cron
6f9d508714 cmake: iar/msvc: Set base compile and link options target by target
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 18:09:40 +02:00
Ronald Cron
d9e1109d23 cmake: clang: Set base compile and link options target by target
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 18:09:40 +02:00
Ronald Cron
4ae24f4fea cmake: GNU GCC: Add base link options
target_compile_options() does not set
link options as setting CMAKE_C_FLAGS
does. Thus set link options with
set_target_properties(). target_link_options()
is not available in CMake 3.5 used in the CI.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 18:09:40 +02:00
Ronald Cron
b2478989e2 cmake: GNU GCC: Set base compile options target by target
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 18:09:33 +02:00
Ronald Cron
d77fad2556 Group C_FLAGS settings by compiler type
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 17:40:44 +02:00
Ronald Cron
7323b3e112 cmake: Remove UNSAFE_BUILD option
The UNSAFE_BUILD option was introduced for
the builds with NULL entropy
(option MBEDTLS_TEST_NULL_ENTROPY) but this
configuration option does not exist
anymore.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-25 17:40:44 +02:00
Gilles Peskine
665df83d34
Merge pull request #9293 from gilles-peskine-arm/outcome-check-repeated-configurations-all.sh-preliminaries
Fix some all.sh components with sub-components
2024-10-25 14:59:15 +00:00
David Horstmann
fd38fdf501 Disentangle 3.6/4.0 *_PSA_INIT/DONE variants
Since PSA is always on in 4.x, *_PSA_INIT() and *_PSA_DONE() can be
simply aliased to PSA_INIT() and PSA_DONE() until such a time as we
remove them.

Simplify the login of these PSA_INIT/DONE variants by aliasing them in
4.x and keeping the more complex 3.6 logic entirely separate.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-10-25 15:13:00 +01:00
Ronald Cron
5f6e69dae5
Merge pull request #9693 from Harry-Ramsey/split-revert-error-development
Split error.h and move back error.c to mbedtls
2024-10-25 13:12:58 +00:00
Gilles Peskine
4e9d77e6e7
Merge pull request #9703 from valeriosetti/fix-9690-workarounds
Revert & fix #9690 workarounds
2024-10-25 11:47:44 +00:00
Paul Elliott
9a209b8251 Pair inits with declarations
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-10-25 12:41:28 +01:00
Paul Elliott
a87a906a4c Move AES_PSA_INIT to after drbg init
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-10-25 12:27:36 +01:00
Gilles Peskine
3982898c3a Remove legacy components with an equivalent USE_PSA component
Remove all.sh components that explicitly disable MBEDTLS_USE_PSA_CRYPTO, and
for which there is another component with MBEDTLS_USE_PSA_CRYPTO enabled
that does the same or more testing.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-10-24 20:37:33 +02:00
Paul Elliott
da510d6390 Fix double free in case of test failure
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-10-24 14:58:22 +01:00
Paul Elliott
65b276c613 Add missing check of return
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-10-24 14:58:22 +01:00
Paul Elliott
a698976fdb Add const specifiers to pacify armclang
Functions designed for local scope only should be const

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-10-24 14:58:22 +01:00