Commit graph

26677 commits

Author SHA1 Message Date
Gilles Peskine
6919546ddf Update more test dependencies when using test-ca.key
Those test cases aren't actually executed due to another typo which is
beyond the scope of this commit and will be resolved in
https://github.com/Mbed-TLS/mbedtls/pull/8029 . But update DES to AES anyway.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-03 12:02:14 +02:00
Jerry Yu
8a599c03fa Add aesni only test
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 17:01:02 +08:00
Jerry Yu
17a9d2e412 Add MBEDTLS_AES_USE_HADWARE_ONLY for test_aesni
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 16:14:18 +08:00
Jerry Yu
1221a31cc4 Run aes tests only for test_aesni
That can reduce time of selftest

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 16:09:07 +08:00
Jerry Yu
69dd441eb5 Remove test_aes_*
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-03 16:00:20 +08:00
Gilles Peskine
2823b41f74
Merge pull request #8026 from gilles-peskine-arm/readthedocs-3.4.1
[3.4.1] Fix readthedocs build
2023-08-02 20:54:29 +02:00
Waleed Elmelegy
d4e7fe09b3 Change tests to work on different MBEDTLS_RSA_GEN_KEY_MIN_BITS configs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2023-08-02 16:59:59 +00:00
Gilles Peskine
d3a797710a psa_is_key_slot_occupied: change to using the key identifier
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-02 18:36:06 +02:00
Gilles Peskine
a824f8bc91 Update test dependencies when using test-ca.key
"tests/data_files/test-ca.key" is now encrypted using AES instead of DES.
Update test dependencies accordingly. This fixes `depends.py cipher_id`.

This is a partial cherry-pick of 1a4cc5e92c
(done manually because the context on the same line is different).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-02 16:38:21 +02:00
David Horstmann
b7583c9a8f Add _build/ and api/ to gitignore
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
9d06c7d5e5 Clean the breathe-apidoc files with make clean
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
6c77852252 Revert "Add exemption for make.bat in checks for tabs"
This is no longer needed as make.bat has been removed. We do not support
building the documentation on Windows.

This reverts commit d50daedcca.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
8d7b213ef8 Remove make.bat for documentation
Building the docs on Windows is not supported in any case, as the apidoc
target in the main Makefile will not run on Windows.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
e51ef92efd Improve docs Makefile to do full build
Include the make apidoc and breathe-apidoc steps in the documentation
Makefile for ease of use. In this way, depart from the Makefile
generated automatically by Sphinx.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
dbee883c74 Improve positioning of GENERATE_XML option
It is clearer to have this option next to the GENERATE_LATEX option.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
5532597de3 Remove Exhale from requirements and regenerate
Regenerate the requirements.txt with Exhale removed and also with Python
3.9 instead of 3.8, for parity with Read The Docs.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
1fa678d58e Add exemption for make.bat in checks for tabs
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
b9f0674ef1 Ignore mbedtls macros causing warnings
Sphinx's breathe plugin cannot readily parse the Mbed TLS macros, so
define the less essential ones away at the doxygen step to reduce the
number of warnings.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
bd2947684c Add configuration for Read The Docs
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
7cedefe2fb Add initial API doc configuration
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
1d46bfbae8 Tell Doxygen to generate XML
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
David Horstmann
df28b8d2ea Add space to appease doxygen bug
See doxygen/doxygen#8706

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-02 16:06:32 +02:00
Gilles Peskine
ce64156f6d
Merge pull request #8021 from daverodgman/master-update
Sync development with accidental merge directly onto master
2023-08-02 13:30:35 +00:00
Dave Rodgman
1de02049e4 Clarify changelog not needed for compiler warnings
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-02 13:01:14 +01:00
Kusumit Ghoderao
6eff0b2258 Remove test vector
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-08-02 17:22:49 +05:30
Janos Follath
d8cb3d7fa4 De-duplicate ecp.c
We duplicated ecp.c in the anticipation of heavy refactoring there. This
work has been suspended and the duplication is not useful anymore but
imposes an overhead.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-08-02 12:33:01 +01:00
Gilles Peskine
4a415fd470 Announce a release for Friday
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-02 12:51:44 +02:00
Gilles Peskine
82c159fb54 Prepare changelog for release
```
./scripts/assemble_changelog.py
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-02 12:51:01 +02:00
Gilles Peskine
550d147078 Bump version to 3.4.1
```
./scripts/bump_version.sh --version 3.4.1
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-02 12:50:23 +02:00
Gilles Peskine
a256fd8f94 Write changelog entry for the test data update
We normally don't mention test updates in the changelog, but this one
explains why we're making a patch release.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-02 12:49:07 +02:00
Gilles Peskine
267bee9be8
Merge pull request #7903 from valeriosetti/issue7773
Define PSA_WANT_xxx_KEY_PAIR_yyy step 2/DH
2023-08-02 10:16:44 +00:00
Gilles Peskine
50745e7e35 Update failing unit tests to use the moved data files
After upgrading certificates, some parsing unit tests are failing because
the new certificates have a different expiry date, by design. Switch those
test cases to using the moved copy of the old data (as we did in a more
systematic way in the development branch).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-02 12:12:53 +02:00
Gilles Peskine
7e52921c9a Copy test certificates files from development
Copy updated test certificates and related data (keys, CSR, etc.) from
development. This replaces certificates that will expire on 2023-09-07,
causing the unit tests to fail. This also adds new data files that are not
used, and moves some files.

The replacement data is good until 2023-12-31.

The update causes some parsing unit tests to fail because the new
certificates have a different expiry date. This will be fixed in a
subsequent commit.

```
git checkout dc2d7cce02 -- tests/data_files tests/src/test_certs.h tests/src/certs.c
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-02 12:00:06 +02:00
Dave Rodgman
7f17bd09cc Merge remote-tracking branch 'origin/master' into master-update 2023-08-02 10:57:07 +01:00
Jerry Yu
1414029ff0 improve document about hardware only
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:03 +08:00
Jerry Yu
6943681820 Improve error message and documents
- fix grammar error
- Add more information for AES_USE_HARDWARE_ONLY
- Improve error message

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:03 +08:00
Jerry Yu
e77c4d95a7 Mention the crash risk without runtime detection
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:02 +08:00
Jerry Yu
9e3e3dd45b Fix code-style too-long line fail
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:02 +08:00
Jerry Yu
02b1519ab6 move accelerator checks to aes.c
Origin position is always validate due to conflict
between the guards in `aes.c` and module undef check

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:02 +08:00
Jerry Yu
4dfbb2e747 add changelog entry
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:01 +08:00
Jerry Yu
d76ded046c fix various issues
- unnecessary command
- extra blank and empty line

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:01 +08:00
Jerry Yu
3660623e59 Rename plain c option and update comments
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:01 +08:00
Jerry Yu
8840a8c574 fix wrong checks
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:00 +08:00
Jerry Yu
3fcf2b5053 Rename HAS_NO_PLAIN_C to DONT_USE_SOFTWARE_CRYPTO
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:00 +08:00
Jerry Yu
1b3ab36b55 Update comments
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:59 +08:00
Jerry Yu
4d030f3acd Add check for no aes implementation provided
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:59 +08:00
Jerry Yu
315fd30201 Rename plain c disable option
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:59 +08:00
Jerry Yu
2f26a59910 Add std output information for AESCE in gcm
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:58 +08:00
Jerry Yu
d767cc4106 Add accelerator only tests.
The cases with runtime detection have been
covered by `full` configuration

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:58 +08:00
Jerry Yu
0d4f4e5b01 Add option to disable built-in aes implementation.
For time being, there are only two aes implementations for known
architectures. I define runtime detection function as const when
built-in was disabled. In this case, compiler will remove dead
built-in code.

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:54 +08:00