Paul Elliott
f29cc32a06
Merge pull request #8390 from gilles-peskine-arm/20231017-misc-cleanup-2.28
...
Backport 2.28: Cleanups in test code
2023-10-30 18:07:47 +00:00
Tomás González
aaea3a3148
check_test_cases: Unify walk_compat_sh and walk_opt_sh into one
...
walk_compat_sh and walk_opt_sh are basically the same now, so:
* Merge them into one function.
* Use the --list-test-cases option for both of them.
* Rename this merged function as collect_from_script which seems
more appropriate as since it isn't iterating the script but
calling it.
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-10-30 14:23:57 +00:00
Tomás González
cbb2e45e96
ssl-opt: Introduce --list-test-cases option
...
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-10-30 14:23:56 +00:00
Bence Szépkúti
3ccb844117
Merge pull request #8373 from sergio-nsk/sergio-nsk/8372/1
...
Backport 2.28: Fix compiling AESNI in Mbed-TLS with clang on Windows
2023-10-26 15:59:05 +00:00
Gilles Peskine
c8d89a164d
Merge pull request #8421 from gilles-peskine-arm/test-datax-chdir-2.28
...
Backport 2.28: Support running unit tests from another directory
2023-10-26 15:54:50 +00:00
Gilles Peskine
f38e2fe97b
Merge pull request #8118 from gilles-peskine-arm/ssl-progs-usage-2.28
...
Backport 2.28: Fix usage & error reporting in SSL programs
2023-10-25 17:03:23 +00:00
Gilles Peskine
e3d1c76818
Fix invocation with explicit .datax file
...
Don't chdir when invoking a test suite executable with an explicit .datax
file. The point of the chdir is to automatically find the .datax file (and
the relative location of the data_files directory) in typical cases. This
conflicts with the expectation that passing a relative path to a .datax file
will work.
(This is what I had originally intended, and what is documented in the
comment, but I forgot to add the argc check in the initial commit.)
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-25 17:47:42 +02:00
Gilles Peskine
290e008925
Define try_chdir everywhere
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-25 17:47:42 +02:00
Gilles Peskine
460cf76ef5
Note about the lack of Windows support
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-25 17:47:42 +02:00
Gilles Peskine
994efa2aa0
Print a notice if chdir fails
...
Fixes -Wunused-result warning.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-25 17:47:42 +02:00
Gilles Peskine
9cc1255e99
Support running unit tests from another directory
...
When running a test suite, try to change to the directory containing the
executable. This allows running a test suite from any directory, and still
allow it to access its .datax file as well as data files (generally in
tests/data_files) used by individual test cases.
Only implemented on Unix-like systems and on Windows.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-25 17:47:42 +02:00
Dave Rodgman
37b8478ab8
Merge pull request #8403 from daverodgman/iar-fixes-2.28
...
Backport 2.28: Stop IAR warning about goto skipping variable definition
2023-10-23 14:59:33 +01:00
Tom Cosgrove
c6d562815d
Merge pull request #8392 from lpy4105/backport-2.28/issue/support-cpuid-for-win32
...
Backport 2.28: Support cpuid for win32
2023-10-23 10:43:36 +00:00
Dave Rodgman
2af05c857a
Stop IAR warning about goto skipping variable definition
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-23 11:04:36 +01:00
Pengyu Lv
e6cbec8ea7
all.sh: build_mingw: test build default config without MBEDTLS_AESNI_C
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-10-20 09:54:41 +08:00
Gilles Peskine
fa27636396
Close file on error path
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-19 17:24:23 +02:00
Gilles Peskine
bf8520080a
Use modern macros for calloc in test code
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-19 17:24:23 +02:00
Dave Rodgman
3ca2f5cd01
Make TEST_CALLOC_NONNULL more robust
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-19 17:24:23 +02:00
Gilles Peskine
7e36ad1f5c
Merge pull request #7983 from gilles-peskine-arm/sample-program-demos-2.28
...
Backport 2.28: Run sample program demo scripts in all.sh
2023-10-19 15:11:00 +00:00
Pengyu Lv
b2ca03251d
all.sh: build_mingw: test AESNI intrinsics
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-10-19 17:17:19 +08:00
Pengyu Lv
c5d9d2d67e
Reword the changelog entry
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-10-19 16:52:01 +08:00
Pengyu Lv
f24a85fd5e
Add a changelog entry
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-10-19 16:52:01 +08:00
Pengyu Lv
f3c6e2ee34
aesni: select __cpuid
impl based on compiler type
...
MinGW provides both kinds of implementations of `__cpuid`,
but since `cpuid.h` is provided by GNUC, so we should choose
the implementation by the compiler type instead of OS type.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-10-19 16:45:37 +08:00
Pengyu Lv
79d7faf030
aesni: declare cpuinfo as int
...
Change the type of array that stores the cpuinfo
data to int[4] to match the signature of `__cpuinfo`
in `intrin.h` header file.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-10-19 16:45:37 +08:00
Pengyu Lv
2856e076e6
aesni: support cpuid on WIN32
...
`__cpuid` has two kinds of signatures in different
headers depending on the target OS. We make it
consistent between the usages ang the included header.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
2023-10-19 16:45:36 +08:00
Sergey Markelov
9902a6b752
Fix #8372 - Error compiling AESNI in Mbed-TLS with clang on Windows
...
It can successfully compile w/ or w/o the clang options -maes -mpclmul.
Signed-off-by: Sergey Markelov <sergey@solidstatenetworks.com>
2023-10-18 20:26:01 -07:00
Dave Rodgman
72aa683aae
Introduce TEST_CALLOC_NONNULL
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-18 18:14:56 +02:00
Gilles Peskine
ce9c4f52c4
Remove redundant null check
...
crl_file is a test argument and can't be null. Besides the code above
already assumes that it's non-null.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-18 18:13:39 +02:00
valerio
5b5da941a4
test: proper positioning of USE_PSA_INIT + fixed some exit labels
...
Very partial backport of 32f2ac9a180e08c35f4643e8e969f864a2d79ada
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-18 18:12:39 +02:00
Gilles Peskine
11f41793f8
Fix missing initializations on some error paths
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-18 18:12:36 +02:00
Gilles Peskine
5fdd0bddb4
Convey that it's ok for mbedtls_ssl_session_save to fail
...
mbedtls_ssl_session_save() always outputs the output length, even on error.
Here, we're only calling it to get the needed output length, so it's ok to
ignore the return value. Convey this to linters.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-18 17:45:25 +02:00
Manuel Pégourié-Gonnard
0ee9dacb4d
Merge pull request #8122 from gilles-peskine-arm/ssl-test-no-legacy-2.28
...
Backport 2.28: Remove GNUTLS_LEGACY and OPENSSL_LEGACY (partly)
2023-10-18 07:13:15 +00:00
Bence Szépkúti
01902779a3
Merge pull request #8162 from yanrayw/2.28-save_stack_usage_pkwrite
...
Backport 2.28: pkwrite: use heap to save stack usage for writing keys in PEM string
2023-10-13 14:27:18 +00:00
Dave Rodgman
3841af02f5
Merge pull request #8349 from kasjer/kasjer/mbedtls-2.28/aes-rcon-rename
...
[Backport 2.28] Rename local variable in aes.c
2023-10-12 14:56:07 +00:00
Jerzy Kasenberg
1222ae67d5
Rename local variable in aes.c
...
This changes local variable name RCON to round_constants.
RCON being definition in xc32 compiler headers for some PIC32 register.
Without this change mynewt project for PIC32 platform fails to build due to
macro redefinition.
This does not changes behavior of library in any way.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-10-12 09:16:34 +02:00
Tom Cosgrove
44af43639c
Merge pull request #8333 from yanrayw/2.28_aes_benchmark_cfb
...
Backport 2.28: Benchmark: add AES_CFB128 and AES_CFB8
2023-10-11 12:59:28 +00:00
Yanray Wang
c55060d42a
benchmark: improve code readability
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-10-10 10:49:32 +08:00
Yanray Wang
c96db3bf25
benchmark: add AES_CFB8
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-10-10 10:49:32 +08:00
Yanray Wang
b382c2b0e7
benchmark: add AES_CFB128
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-10-10 10:49:32 +08:00
Dave Rodgman
e0be6bfafa
Merge pull request #8324 from tom-daubney-arm/fix_mbedtls_styling_docs_228
...
Backport 2.28: Correct styling of Mbed TLS in documentation
2023-10-06 20:07:40 +00:00
Thomas Daubney
0814a22490
Correct styling of Mbed TLS in documentation
...
Several bits of documentation were incorrectly styling Mbed TLS
as MbedTLS.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-06 17:37:01 +01:00
Dave Rodgman
360320a660
Merge pull request #8293 from daverodgman/check-changelog-exts-2.28
...
2.28 backport - Check changelog extensions
2023-10-05 17:22:45 +00:00
minosgalanakis
064e732640
Merge pull request #1102 from Mbed-TLS/mbedtls-2.28.5_mergeback
...
Mbedtls 2.28.5 mergeback
2023-10-05 17:33:08 +01:00
Paul Elliott
36a4ea5c01
Merge pull request #8302 from davidhorstmann-arm/cmake-fix-3rdparty-custom-config-2.28
...
[Backport 2.28] CMake: fix build with 3rdparty module enabled through a custom config
2023-10-04 22:59:43 +00:00
minosgalanakis
47e8cc9db2
Merge pull request #1092 from Mbed-TLS/mbedtls-2.28.5rc0-pr
...
Mbedtls 2.28.5rc0 pr
2023-10-04 23:11:08 +01:00
Minos Galanakis
e18540886c
Updated BRANCHES.md
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-10-04 21:05:17 +01:00
Gilles Peskine
66a868b6af
CMake: fix build with 3rdparty module enabled through a custom config
...
Fixes #8165
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-04 15:11:10 +02:00
Minos Galanakis
468d6e8e0e
ChangeLog: Set release date
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-10-03 22:28:07 +01:00
Minos Galanakis
7de3eed636
Prepare ChangeLog for 2.28.5 release
...
```
./scripts/assemble_changelog.py
```
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-10-03 22:26:03 +01:00
Minos Galanakis
c7a8ea998d
Bump version to 2.28.5
...
```
./scripts/bump_version.sh --version 2.28.5
```
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-10-03 22:24:04 +01:00