1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00
Commit Graph

18772 Commits

Author SHA1 Message Date
62ba696bae Undo not-needed change
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:50 +00:00
e2317649dd Allow wrappers to be missing; quote directory name from make
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:50 +00:00
0b069bd5b1 Avoid infinite loop
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:50 +00:00
57783d7459 Extract common parts of quiet wrapper
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:50 +00:00
6529f12d35 Tidy up quiet wrappers
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:50 +00:00
4cb98a930c Move quiet wrapper setup
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:48 +00:00
634fe908b7 Improve quote_args output readability
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:16 +00:00
d4a5563417 Improve output from make/cmake wrapper
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:16 +00:00
59f9df999d Always display make/cmake invocation command
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:16 +00:00
75da313166 Pacify check_files
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:16 +00:00
8470d114e2 Spelling fix
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:16 +00:00
a0b7c08b60 Use quiet make wrappers from all.sh
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:11:14 +00:00
99fa0d08d3 Create quiet wrappers for make and cmake
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:09:58 +00:00
24d60ad716 Merge branch 'mbedtls-2.28-restricted' into backport_asymmetric_encrypt_buffer_protection
Signed-off-by: tom-daubney-arm <74920390+tom-daubney-arm@users.noreply.github.com>
2024-02-28 15:43:48 +00:00
80de1475a1 Fix incorrect conflict resolution
A return statement was missing in the wrapper generation script.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-28 15:16:44 +00:00
10e44f3fd1 Add missing guards around exit label
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-28 14:17:49 +00:00
cb086af4bc Merge pull request #8860 from gilles-peskine-arm/ecp-write-doc-2.28
Backport 2.28: Document ECP write functions
2024-02-28 11:04:27 +00:00
6b01954e09 Merge pull request #1150 from tom-daubney-arm/backport_mac_buffer_protection
[Backport] - MAC buffer protection
2024-02-26 19:06:45 +00:00
4e8215057c Generate test wrappers for psa_generate_random()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-26 18:26:06 +00:00
65bf12ce6b Add buffer copying to psa_generate_random()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-26 18:26:00 +00:00
be060f1e85 Suppress pylint
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-26 13:55:42 +00:00
9721b868a2 Allow null buffers when the length is 0
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-26 12:38:16 +01:00
84dc44b9b5 Note that ecp read/write functions don't support Curve448 yet
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-26 09:05:45 +01:00
7ce99c0f3a mbedtls_ecp_write_key: document that this function doesn't detect unset data
Fixes #8803.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-26 09:04:29 +01:00
e65e98a1dc mbedtls_ecp_write_key: document and test smaller output buffer
Document and test the current behavior, even if it is weird:

* For Weierstrass keys, the error is MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL,
  not MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL.
* For Weierstrass keys, a smaller output buffer is ok if the output fits.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-26 09:02:44 +01:00
75bb596de8 mbedtls_ecp_write_key: document and test larger output buffer
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-26 09:01:51 +01:00
c2c74b9cef mbedtls_ecp_write_key: no FEATURE_UNAVAILABLE error
When exporting a key, MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE should not happen.
This error indicates that the curve is not supported, but that would prevent
the creation of the key.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-26 08:54:25 +01:00
a4486ceff2 scripts/bump_version.sh: update pkgconfig version
Bump the version number in pkgconfig/CMakeLists.txt so the package
config files stay in sync with the project VERSION.

This is Related to:
- aa4862a5e ("Bump the version number in CMakeLists.txt")

But changes were made to support CMake prior to version 3.0.

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
2024-02-23 09:09:17 -06:00
202a16329d pkg-config: add initial pkg-config files
Add three package config files for mbedtls, mbedcrypto and mbedx509.
Also update various project variables so the generated PC files have the
required data needed without hardcoding it everywhere.

This will help distros package the project following existing
conventsions between a normal and -devel package that includes the
headers and .pc files for pkg-config aware consumers.

This also squashes:
  - fff51cecc ("Update ChangeLog.d/pkg-config-files-addition.txt")

Fixes: #228
Signed-off-by: Bill Roberts <bill.roberts@arm.com>
2024-02-23 09:07:59 -06:00
8eafe1525d Merge branch 'mbedtls-2.28-restricted' into backport_mac_buffer_protection
Signed-off-by: tom-daubney-arm <74920390+tom-daubney-arm@users.noreply.github.com>
2024-02-22 15:28:49 +00:00
09cf4f2e78 Decouple if statement in psa_raw_key_agreement exit.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-22 11:08:22 +00:00
36e6bd6926 Merge pull request #8811 from gilles-peskine-arm/pk_import_into_psa-backports-2.28
Backport 2.28: bugs fixed in "Implement mbedtls_pk_import_into_psa"
2024-02-21 15:45:21 +00:00
2ea8d8fa3c Revise how output allocation is checked
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-21 15:16:01 +00:00
0736df33ac Check for output allocation before randomising
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-21 12:28:20 +00:00
0ce9589e36 Merge pull request #1133 from davidhorstmann-arm/copying-aead-2.28
[Backport 2.28] Copy buffers in AEAD
2024-02-20 16:07:36 +00:00
26d1c43821 Check output allocated before randomising
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-20 11:26:55 +00:00
53e5adfca4 Merge pull request #8841 from BensonLiou/use_init_api-228
use mbedtls_ssl_session_init() to init session variable
2024-02-19 15:49:29 +00:00
6805ff7892 use mbedtls_ssl_session_init() to init session variable
Use mbedtls_ssl_session_init() to init variable just like
session-family APIs described

Signed-off-by: Benson Liou <benson.liou@sony.com>
2024-02-17 00:19:10 +08:00
049ea32931 Fix copypasta
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-02-15 15:32:47 +01:00
3c0c6b1c4b Conditionally include exit label
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-15 14:25:08 +00:00
db5d607cb1 Generate test wrappers
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-15 14:18:02 +00:00
9da359fc65 Add buffer protection to psa_key_derivation_key_agreement
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-15 14:15:46 +00:00
4304276539 Add buffer protection to psa_raw_key_agreement
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-02-15 13:47:08 +00:00
a9cc4cd1cb Merge pull request #1179 from Ryan-Everett-arm/key-derivation-buffer-protection-backport
[Backport] Add buffer copying to the Key Derivation API
2024-02-15 11:54:28 +00:00
7ebb3c5d01 Add metatests for failing TEST_EQUAL and TEST_LE_*
After getting caught with deadlock issues when these tests fail, add a
metatest to test them failing.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-02-14 15:07:40 +00:00
039c903e7b Merge pull request #8818 from forkiee2/mbedtls-2.28
Backport 2.28: move entropy init prior arguments number recognition
2024-02-14 13:43:32 +00:00
75c8e61ce0 Merge pull request #8814 from gilles-peskine-arm/rsa-bitlen-fix-2.28
Backport 2.28: Fix mbedtls_pk_get_bitlen for a key size that is not a multiple of 8
2024-02-14 11:18:28 +00:00
c609654665 newline at end of changelog file
Signed-off-by: PiotrBzdrega <piotrbzdrega@yandex.com>
2024-02-13 22:12:23 +01:00
eb77b6f418 Add session config bit for KEEP_PEER_CERTIFICATE
This config option decides whether the session stores the entire
certificate or just a digest of it, but was missing from the
serialization config bitflag.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-13 18:59:07 +00:00
a2fd778868 Merge pull request #1148 from tom-daubney-arm/backport_hash_buffer_protection
[Backport] - Hash buffer protection
2024-02-13 18:17:57 +00:00