Commit graph

22969 commits

Author SHA1 Message Date
Gilles Peskine
8a32a75aa2 mbedtls_mpi_random: avoid local allocation
Rewrite the minimum bound comparison to avoid a local allocation. This costs
a bit of code size, but saves RAM. This is in preparation for moving the
bulk of the function to the bignum_core module where allocation is not
permitted.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 23:06:43 +01:00
Gilles Peskine
6f949ea67b New constant-flow function mbedtls_mpi_core_uint_le_mpi
Compare a single-limb MPI with a multi-limb MPI. This is rather ad hoc, but
will be useful for mbedtls_mpi_core_random.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 23:06:43 +01:00
Gilles Peskine
cf0074b2c8 More wording improvements
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 19:56:52 +01:00
Gilles Peskine
afb15206b5 Wording clarification
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 19:56:52 +01:00
Gilles Peskine
f3cc9d925f Improve "codegen 1.1" entry
"version 1.1 of #5137" is not meaningful to users, only as an internal
project milestone. Explain what this means from a user's point of view.

Announce the requirement for jsonschema in the proper section, which is
"Requirement changes". Mention jinja2 and basic.requirements.txt which
had not previously been explicitly mentioned in the changelog.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 19:56:52 +01:00
Gilles Peskine
723bee67b2 Wrap lines to 79 columns max
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 19:56:52 +01:00
Gilles Peskine
5ba1697e8a Put behavior change in the correct category
"Changes" is for miscellaneous stuff that doesn't affect backward
compatibility.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 19:56:52 +01:00
Gilles Peskine
6593c7e1cb Clarify PSS sigalg entry
If my understanding is correct (to be confirmed in review), this is a new
feature which was not particularly desired on its own but was the simplest
way to fix an interoperability issue in TLS 1.2 caused accidentally by
the work on TLS 1.3.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 19:56:52 +01:00
Gilles Peskine
29a56a1251 Clarify ASN.1 entry named data free functions
Mention the name of the new functions in the "Features" entry. Clarify what
they're for (there's no structure called mbedtls_x509_named_data, it's
mbedtls_asn1_named_data, but that name isn't so important here since we've
mentioned the names of the functions).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 19:56:52 +01:00
Gilles Peskine
6d069afe6b Clarify that these two entries are about CMake
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 19:56:52 +01:00
Gilles Peskine
20c1f03dd5 Improve wording, punctuation, etc.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 19:56:47 +01:00
Dave Rodgman
235d1d8519 Improve wording
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-12-01 18:45:02 +00:00
Dave Rodgman
6ebaf7a1f8 Whitespace fix
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-12-01 18:33:58 +00:00
Dave Rodgman
bc5f03dabc Disable PKCS7 by default; improve docs
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-12-01 18:32:23 +00:00
Gilles Peskine
2f66115e0e No need for -g or -O in LDFLAGS
Fix a mistake in the previous commit.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 18:05:31 +01:00
Gilles Peskine
202b1a07ba You need --coverage when linking as well
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-12-01 17:41:36 +01:00
Valerio Setti
e98db0b866 tls: pake: fix description for mbedtls_ssl_set_hs_ecjpake_password_opaque
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-12-01 16:52:57 +01:00
Valerio Setti
b287ddff7e test: psa_pake: add more tests for opaque password setting
Added mixed cases:
- server using opaque password, while client not
- client using opaque password, while server not

Added a test with mismatched passwords in case both server and
client are using opaque passwords (the same test was already
present for the non-opaque case)

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-12-01 16:18:12 +01:00
Jerry Yu
7854a4e019 Add max_early_data_size option for ssl_sever2
- to set max_early_data_set

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-12-01 23:11:48 +08:00
Jerry Yu
cc4e007ff6 Add max_early_data_size to mbedtls_ssl_config
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-12-01 23:11:48 +08:00
Jerry Yu
16f6853b05 Add max_early_data_size config option
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-12-01 23:11:48 +08:00
Jerry Yu
a6934776c9 Add reco_debug_level to reduce debug output
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-12-01 23:11:48 +08:00
Tom Cosgrove
62b20488f1 Implement mbedtls_mpi_mod_sub()
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2022-12-01 14:27:37 +00:00
Valerio Setti
dc40bbc2d7 test: pake: remove redundant test for opaque passwords
This is already covered by other already existing cases such as
"component_test_full_cmake_gcc_asan" which build with
"config.py full" and run all "ssl-opt.sh" test cases.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-12-01 15:25:49 +01:00
Valerio Setti
4452e98ec1 test: pake: add tests for set password functions
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-12-01 15:08:35 +01:00
Valerio Setti
0944329036 tls: pake: add check for empty passwords in mbedtls_ssl_set_hs_ecjpake_password()
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-12-01 15:06:09 +01:00
Dave Rodgman
481a5e427b Improve parsing of test data
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-12-01 13:31:20 +00:00
Dave Rodgman
c3902ac661
Merge pull request #6698 from wernerlewis/bignum_mod_py
Bignum: Enable test generation from bignum_mod.py
2022-12-01 11:48:14 +00:00
Dave Rodgman
7fc53dd83d Suppress over-eager compiler warnings in tests
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-12-01 11:42:29 +00:00
Paul Elliott
266f79c136
Merge pull request #6426 from aditya-deshpande-arm/driver-wrapper-key-agreement
Add driver dispatch layer for raw key agreement, along with test call for transparent drivers.
2022-12-01 11:40:52 +00:00
Dave Rodgman
9dc55ba932 Suppress over-eager compiler warnings in test code
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-12-01 10:49:57 +00:00
Dave Rodgman
63e6a88874 Suppress over-eager compiler warning in tests
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-12-01 10:01:08 +00:00
Dave Rodgman
28f424f238 Clarify support for mixed-endian platforms
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-12-01 09:49:44 +00:00
Dave Rodgman
7f62f36f82 Add changelog entry
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-12-01 09:44:31 +00:00
Dave Rodgman
fb5fedcd00 Add tests for alignment.h
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-12-01 09:40:03 +00:00
Gilles Peskine
749a0d7be8 Add option to reset the traces, to use after rework
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-30 18:08:14 +01:00
Gilles Peskine
e628f291ae Put temporary files in a temporary directory
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-30 17:56:58 +01:00
Gilles Peskine
d7db883b71 Fix "make lcov" in CMake out-of-tree builds
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-30 17:52:54 +01:00
Gilles Peskine
cb33076353 Call the new lcov script from CMake builds
The code in CMakeLists.txt was an old copy of the code in Makefile. This
brings in branch coverage, which had only been added to Makefile.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-30 17:52:01 +01:00
Gilles Peskine
eff88034d4 Add a bit of documentation
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-30 17:51:44 +01:00
Gilles Peskine
3d4ea5490f Move lcov commands to a separate script
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-30 17:35:44 +01:00
Werner Lewis
cff7578822 Add imports to bignum_mod
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-11-30 16:34:07 +00:00
Aditya Deshpande
5484e96117 Add changelog entry
Signed-off-by: Aditya Deshpande <aditya.deshpande@arm.com>
2022-11-30 15:56:42 +00:00
Valerio Setti
a6b69dabc5 test: psa_pake: add a separate test for opaque password
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-11-30 16:44:49 +01:00
Gilles Peskine
18f7028a0e Preserve line breaks from continued line comments
The commit "Preserve line breaks in comments before test functions"
only handled block comments. This commit handles line comments.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-30 16:38:49 +01:00
Gilles Peskine
a942b370fe
Merge pull request #6694 from tom-cosgrove-arm/fix-name-of-basic-build-test.sh
Fix the name of basic-build-test.sh within the file
2022-11-30 16:19:55 +01:00
Dave Rodgman
2dae4b3ef6 Support armcc builtin byteswap routine
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-11-30 15:18:39 +00:00
Werner Lewis
c84b731941 Enable test generation from bignum_mod.py
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-11-30 14:43:31 +00:00
Dave Rodgman
2d0f27d0fc Make use of optimised bswap from ARIA
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-11-30 12:16:21 +00:00
Manuel Pégourié-Gonnard
fe549a76e4 Add comment about use of ASAN_CFLAGS
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-11-30 12:38:58 +01:00