Commit Graph

32209 Commits

Author SHA1 Message Date
Gilles Peskine
c2b94d45d4 Merge pull request #10401 from gilles-peskine-arm/psa_can_do-declare-publicly-3.6
Backport 3.6: Declare psa_can_do_cipher() publicly
2025-09-15 12:02:50 +00:00
Janos Follath
753036edb3 Merge pull request #10336 from gilles-peskine-arm/generated-files-lib-build-3.6
Backport 3.6: fix `make lib GEN_FILES=` sometimes requiring python
2025-09-12 13:27:26 +00:00
Gilles Peskine
9a5444a3b8 Fix copypasta
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-12 11:27:11 +02:00
Gilles Peskine
6e1b66320a Improve documentation
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-12 11:27:09 +02:00
Gilles Peskine
447134b704 Announce psa_can_do_cipher()
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-12 11:27:08 +02:00
Gilles Peskine
3aee15b8e5 Declare psa_can_do_cipher() in a public header
Integrators in a client-server architecture need to provide this function on
the client side.

Fixes mbedtls/issues#10341.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-12 11:27:07 +02:00
David Horstmann
fb7eba06b0 Merge pull request #10387 from davidhorstmann-arm/upgrade-python-packages-3.6
[Backport 3.6] Upgrade packages in requirements.txt
2025-09-08 15:31:46 +00:00
Gilles Peskine
943c291f59 Merge pull request #10390 from gilles-peskine-arm/threading-3.6-alt-doc
Improve documentation of MBEDTLS_THREADING_ALT
2025-09-08 09:50:16 +00:00
Gilles Peskine
df13694ecd Improve documentation of MBEDTLS_THREADING_ALT
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-07 14:45:15 +02:00
Gilles Peskine
fe00817fe7 Improve documentation of mutex primitives
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-07 14:42:54 +02:00
Gilles Peskine
c056b64042 Merge pull request #10378 from gilles-peskine-arm/threading-1.0-condition-3.6
Smoke tests for threading
2025-09-05 15:52:01 +00:00
Gilles Peskine
4c40f08148 Update framework: support threading internal interface 4.0.0.0
3.6 is still using the threading internal interface 3.6.0.0 for now.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-05 11:27:13 +02:00
David Horstmann
7f231a634b Upgrade packages in requirements.txt
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2025-09-05 09:36:44 +01:00
Gilles Peskine
56c4dc12b8 Single-threaded test of nominal mutex usage
No negative tests since all forbidden usage has undefined behavior.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-09-01 00:28:15 +02:00
Manuel Pégourié-Gonnard
e0ef179ea7 Merge pull request #10375 from gilles-peskine-arm/threading_internal.h-3.6
Backport 3.6: Create threading_internal.h
2025-08-29 11:48:51 +00:00
Gilles Peskine
c2e9dac28f Expand on why and how we bypass the quiet wrapper
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-08-29 13:23:33 +02:00
Gilles Peskine
9f7ac0371f Fix code style
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-08-29 10:46:52 +02:00
Gilles Peskine
7e43145bac Typo
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-08-29 09:35:29 +02:00
Gilles Peskine
2324a02602 Create threading_internal.h
This is meant to hold threading-related definitions that are not public, but
are used in the test framework.

To be populated later.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-08-29 08:59:27 +02:00
David Horstmann
54bf8addd7 Merge pull request #10366 from davidhorstmann-arm/clarify-file-generation-cc-3.6
[Backport 3.6] Clarify use of `CC` and friends for file generation
2025-08-20 09:48:26 +00:00
David Horstmann
8281e6a13b Clarify use of CC and friends for file generation
Add more detail around how generation of configuration-independent files
chooses a C compiler. Mention that setting HOSTCC or CC is recommended
where there are multiple toolchains.

Mention that the fallback location is the cc executable, which may help
users troubleshooting when the file generation picks up the wrong
toolchain (as in Mbed-TLS/mbedtls#10360).

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2025-08-19 18:14:30 +01:00
minosgalanakis
a53d8c5a33 Merge pull request #10350 from ariwo17/backport/add-pbes2-aes-testdata
[BACKPORT] Issue #398: Add AES-CBC PBES2 test cases to match 3DES variants
2025-08-11 15:04:24 +00:00
Ari Weiler-Ofek
45c781976c Update framework submodule pointer to merged Framework PR#194
Signed-off-by: Ari Weiler-Ofek <ari.weiler-ofek@arm.com>
2025-08-07 19:01:10 +01:00
Ari Weiler-Ofek
afe7e54e3a Backport: add AES PBES2 test cases matching 3DES (including wrong and missing password)
Signed-off-by: Ari Weiler-Ofek <ari.weiler-ofek@arm.com>
2025-08-07 19:01:06 +01:00
Ari Weiler-Ofek
3c086a9b0b Backport: add AES PBES2 test cases matching 3DES (correct password only)
Signed-off-by: Ari Weiler-Ofek <ari.weiler-ofek@arm.com>
2025-08-07 18:59:11 +01:00
Gilles Peskine
fd305341fc Test that make lib can build generated files even when GEN_FILES is off
Test that `make lib GEN_FILES=` does build the generated files if they're
missing. Also, test that this only requires the expected commands: `$(CC)`,
`$(AR)`, `$(PERL)` and `$(PYTHON)`. For Python (and Perl), we don't test for
reliance on unexpected third-party packages: that would be desirable, but
out of scope of this commit.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-31 14:19:18 +02:00
Gilles Peskine
618307046a Also test make clean in library
Don't test `make clean` at the toplevel, that would be too much work (we'd
need to support `$(RM)` in all makefiles, and arrange for `find` as well for
`clean_more_on_top`).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-31 14:15:27 +02:00
Gilles Peskine
50c6d39da2 Fix make lib doing too much when GEN_FILES is off
Fix `make lib GEN_FILES=` attempting to rebuild
`psa_crypto_driver_wrappers*` if the files' timestamps are older than their
dependencies. Turning off `GEN_FILES` is supposed to avoid that.

Fixes #10335.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-31 14:13:42 +02:00
Gilles Peskine
14a3c5cf53 Test make lib with GEN_FILES off
Test that `make lib GEN_FILES=` works in a minimal environment (just `${CC}`
and `${AR}`). We promise that in `README.md`.

Non-regression test for #10335.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-07-31 14:10:57 +02:00
Gilles Peskine
8d524e8841 Merge pull request #10312 from ronald-cron-arm/dependency-on-generated-files
Backport 3.6: cmake: library: Fix potential concurrent file generation
2025-07-30 11:44:53 +00:00
Ronald Cron
5491fe3ee0 Add change log
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-21 09:45:14 +02:00
Ronald Cron
cbe5fa4d40 cmake: library: Add custom targets for generated files
Add a custom target that depends on crypto
generated files, and make both the static and
shared crypto libraries depend on it.

This ensures that when both libraries are built,
the files are not generated concurrently
by the static and shared library targets.

Do the same for the TLS libraries.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2025-07-21 09:26:42 +02:00
Bence Szépkúti
8f4779c6fa Merge pull request #10303 from bensze01/freebsd-3.6
[Backport 3.6] Clean up ci.requirements.txt
2025-07-16 21:29:19 +00:00
Bence Szépkúti
222090abf6 Restrict CI-specific python requirements to Linux
The dependencies declared in ci.requirements.txt are only used in
scripts that we run on the Linux CI.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-07-16 15:13:14 +02:00
Bence Szépkúti
9ecab503c2 Don't install cryptography on the FreeBSD CI
Recent versions of cryptography require a Rust toolchain to install on
FreeBSD, which we do not have set up yet.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-07-16 15:13:13 +02:00
Bence Szépkúti
22dd79367c Freeze cryptography version on the CI at 35.0.0
The version was unspecified because of our use of Python 3.5 on the CI,
whichi has since been eliminated.

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2025-07-16 15:13:13 +02:00
Ronald Cron
cfbde81ad1 Merge pull request #10287 from davidhorstmann-arm/update-4.x-lts-timeline-3.6
[Backport 3.6] Update note about the first 4.x LTS
2025-07-09 14:45:06 +00:00
David Horstmann
ea073d0ee9 Update note about the first 4.x LTS
The release date is yet to be determined, to allow time for 4.x to
stabilise.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2025-07-08 15:11:32 +01:00
Ronald Cron
a329f398e4 Merge pull request #10210 from gilles-peskine-arm/nv-seed-only-3.6
3.6 only: Test a build with entropy only from NV seed
2025-07-02 07:50:45 +00:00
minosgalanakis
1a22f21b74 Merge pull request #1381 from Mbed-TLS/mbedtls-3.6.4-mergeback
Mbedtls 3.6.4 merge-back pr
2025-06-30 22:06:11 +01:00
Minos Galanakis
5b9c7c5204 Revert "Added generated files"
This reverts commit 59e8b3a6b0.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-06-30 18:33:00 +01:00
Manuel Pégourié-Gonnard
01b5d6a5be Merge pull request #10244 from felixc-arm/gcc-15-remove-wnoerror-3.6
[3.6] Turn Wunterminated-string-initialization back into an error
2025-06-26 07:08:56 +00:00
minosgalanakis
c765c831e5 Merge pull request #1373 from Mbed-TLS/mbedtls-3.6.4rc0-pr
Mbedtls 3.6.4rc0
mbedtls-3.6.4 v3.6.4
2025-06-25 20:56:00 +01:00
Minos Galanakis
59e8b3a6b0 Added generated files
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-06-25 14:18:23 +01:00
Minos Galanakis
5374262f3b Version bump 3.6.4
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-06-25 14:07:55 +01:00
Minos Galanakis
c52f68fd21 Assemble ChangeLog
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-06-25 14:07:55 +01:00
Gilles Peskine
4cbf802231 Properly initialize SSL endpoint objects
In some cases, we were calling `mbedtls_test_ssl_endpoint_free()` on an
uninitialized `mbedtls_test_ssl_endpoint` object if the test case failed
early, e.g. due to `psa_crypto_init()` failing. This was largely harmless,
but could have caused weird test results in case of failure, and was flagged
by Coverity.

Use a more systematic style for initializing the stack object as soon as
it's declared.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-06-25 14:07:55 +01:00
Gilles Peskine
ae9a5e86f3 Fix accidentally skipped test assertion
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-06-25 14:07:55 +01:00
minosgalanakis
b5bb58d00b Merge pull request #10249 from gilles-peskine-arm/tls-exporter-coverity-202505-3.6
Backport 3.6: Fix SSL exporter tests
2025-06-25 10:19:17 +00:00
Gilles Peskine
20eee55d9d Properly initialize SSL endpoint objects
In some cases, we were calling `mbedtls_test_ssl_endpoint_free()` on an
uninitialized `mbedtls_test_ssl_endpoint` object if the test case failed
early, e.g. due to `psa_crypto_init()` failing. This was largely harmless,
but could have caused weird test results in case of failure, and was flagged
by Coverity.

Use a more systematic style for initializing the stack object as soon as
it's declared.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-06-24 17:26:35 +02:00