Commit Graph

16561 Commits

Author SHA1 Message Date
Gilles Peskine
8290976801 Fix references to mbedtls_config.h
These were a mistake when backporting the change from the development
branch, where mbedtls/config.h has been renamed to mbedtls/mbedtls_config.h.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-26 18:10:11 +02:00
Gilles Peskine
db7d0d9bef Update query_config
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-15 10:57:20 +02:00
Gilles Peskine
46cc5fd321 Wording improvement
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:57 +02:00
Gilles Peskine
29e89bb448 Make it explicit that an absolute path is also ok
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:57 +02:00
Gilles Peskine
8a5577508e Wording improvement
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:57 +02:00
Gilles Peskine
932b30ba65 Explain why we check that a certain feature is enabled
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:57 +02:00
Gilles Peskine
33665c4800 More precise explanation of MBEDTLS_PSA_CRYPTO_CONFIG disabled
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:57 +02:00
Gilles Peskine
99e075bf15 State explicitly USER config files can modify the default config
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:57 +02:00
Gilles Peskine
25496d0858 Clarify the "duplicate documentation" remark
This remark is intended for maintainers, not for users. It should not have
been in the Doxygen typeset part.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:57 +02:00
Gilles Peskine
726652648e Document the section "General configuration options"
Replace the copypasta that was there.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:57 +02:00
Gilles Peskine
1341e21462 Fix name mismatch in section end comment
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:57 +02:00
Gilles Peskine
d742baa134 Format literal # in a way that doesn't confuse older Doxygen
With Doxygen 1.8.11 (as on Ubuntu 16.04), `#include` doesn't protect the
hash character enough, and Doxygen tries to link to something called
include. (Doxygen 1.8.17 doesn't have this problem.)

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:20 +02:00
Gilles Peskine
86198d71e3 Place MBEDTLS_CONFIG_FILE and such into a new section
Include this new section in the "full for documentation" (`realfull`)
configuration, so that these options are documented in the official
documentation build (`scripts/apidoc_full.sh`).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:20 +02:00
Gilles Peskine
690a2ef13c Test MBEDTLS_PSA_CRYPTO_CONFIG_FILE and MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:20 +02:00
Gilles Peskine
036a9bb92b Test MBEDTLS_USER_CONFIG_FILE as such
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:20 +02:00
Gilles Peskine
78e5288a94 Remove obsolete comment
mbedtls/mbedtls_config.h (formerly mbedtls/config.h) used to be included
directly in many places, so we wanted to test that all of these places
allowed the MBEDTLS_CONFIG_FILE override. Now mbedtls/mbedtls_config.h is
only included via build_info.h, so this is not relevant anymore.

It is no longer particularly useful to test MBEDTLS_CONFIG_FILE with the
full config, but it isn't harmful either, so keep it that way.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:20 +02:00
Gilles Peskine
6af9dc9c59 Simplify build_mbedtls_config_file
$CONFIG_H no longer includes check_config.h since Mbed TLS 3.0.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:20 +02:00
Gilles Peskine
7e2a91fcb6 Support alternative MBEDTLS_PSA_CRYPTO_CONFIG_FILE
When MBEDTLS_PSA_CRYPTO_CONFIG is enabled, support an alternative file to
include instead of "psa/crypto_config.h", and an additional file to include
after it. This follows the model of the existing MBEDTLS_{,USER_}CONFIG_FILE.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:54:20 +02:00
Gilles Peskine
528343513c Improve documentation of MBEDTLS_PSA_CRYPTO_CONFIG
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:51:55 +02:00
Gilles Peskine
781f734bb6 Document MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-04-14 13:51:55 +02:00
Gilles Peskine
d81b5ae238
Merge pull request #5717 from daverodgman/backport_2.28-alert_reentrant
Backport 2.28 - make mbedtls_ssl_send_alert_message() reentrant
2022-04-12 11:05:26 +02:00
Dave Rodgman
50b677d9e5
Merge pull request #5713 from tom-cosgrove-arm/pr-2479-backport-2.28
Backport 2.28: Fix spelling of 'features' in comment
2022-04-11 09:50:36 +01:00
Dave Rodgman
c2d1938a0d
Merge pull request #5720 from tom-cosgrove-arm/adamwolf-reasonable-2.28
Backport 2.28: Fix spelling of 'reasonable' in comments
2022-04-11 09:47:26 +01:00
Manuel Pégourié-Gonnard
9cd8831472
Merge pull request #5721 from tom-cosgrove-arm/roneld-1805-2.28
Backport 2.28: Fix Shared Library compilation issue with Cmake
2022-04-11 09:31:21 +02:00
Gilles Peskine
27ad033a96
Merge pull request #5718 from AndrzejKurek/timeless-struggles-2-28
Backport 2.28: Remove the dependency on MBEDTLS_TIME_H from the timing module
2022-04-08 18:43:12 +02:00
Ron Eldor
b283228ea3 Fix shared library link error with cmake on Windows
Set the library path as the current binary dir

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2022-04-08 17:16:13 +01:00
Adam Wolf
ef30d90cf0 Fix spelling of 'reasonable' in comments
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2022-04-08 17:02:33 +01:00
Gilles Peskine
7ece768578 Seed the PRNG even if time() isn't available
time() is only needed to seed the PRNG non-deterministically. If it isn't
available, do seed it, but pick a static seed.

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-04-08 08:34:50 -04:00
Andrzej Kurek
263d8f7e61 Remove the dependency on MBEDTLS_HAVE_TIME from MBEDTLS_TIMING_C
The timing module might include time.h on its own when on
a suitable platform, even if MBEDTLS_HAVE_TIME is disabled.

Co-authored-by: Tom Cosgrove <tom.cosgrove@arm.com>
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-04-08 08:34:41 -04:00
Andrzej Kurek
2603fec329 Remove dummy timing implementation
Having such implementation might cause issues for those that
expect to have a working implementation.
Having a compile-time error is better in such case.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-04-08 08:28:50 -04:00
Dave Rodgman
28fd4cd8e9 Update ChangeLog.d/alert_reentrant.txt
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-04-08 12:58:19 +01:00
Hanno Becker
a349cfd585 Add ChangeLog entry
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-04-08 12:06:37 +01:00
Hanno Becker
d9c66c0509 Make alert sending function re-entrant
Fixes #1916

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-04-08 12:06:14 +01:00
Jacob Schloss
1882b9a8cd Fix spelling of 'features' in comment
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2022-04-08 11:48:57 +01:00
Gilles Peskine
e29a837ed3
Merge pull request #5705 from AndrzejKurek/off-by-one-ssl-opt-2-28
Backport 2.28 - Fix an off-by-one error in ssl-opt.sh
2022-04-07 16:20:58 +02:00
Andrzej Kurek
363553b5e4 Fix an off-by-one error in ssl-opt.sh
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-04-06 13:38:15 -04:00
Gilles Peskine
619cbfedc9
Merge pull request #5696 from yanesca/fix-lts-version-in-guidelines-2.28
Fix lts version in guidelines [2.28 Backport]
2022-04-05 11:11:22 +02:00
Janos Follath
b71c6259b4 Fix LTS version in contributing guidelines
The LTS branch hasn't been updated in the contributing guidelines.
Deleting it instead of updating as the information is available at the
link above and deleting prevents similar mistakes in the future.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-04-05 09:05:22 +01:00
Gilles Peskine
a8827d190f
Merge pull request #5542 from gilles-peskine-arm/config-baremetal-size-2.28
Backport 2.28: Disable debugging features in the primary code size measurement job
2022-04-04 16:13:05 +02:00
Dave Rodgman
f749930ab8
Merge pull request #5682 from daverodgman/migration_2.28
Update references to old Github organisation
2022-04-01 09:51:28 +01:00
Dave Rodgman
52af769878 Update references to old Github organisation
Replace references to ARMmbed organisation with the new
org, Mbed-TLS, following project migration.

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-03-31 14:27:24 +01:00
Manuel Pégourié-Gonnard
3a7d7b926b
Merge pull request #5670 from bensze01/typo-2.28
[Backport 2.28] Fix comment typo in threading.c
2022-03-30 10:00:05 +02:00
Artur Allmann
e25dc1ccdc Fix typo "phtreads" to "pthreads"
Closes issue #5349

Signed-off-by: Artur Allmann <Artur.Allmann@tptlive.ee>
2022-03-29 17:56:55 +02:00
Manuel Pégourié-Gonnard
19f2d59184
Merge pull request #5660 from ronald-cron-arm/restore-full-compat-testing-2.28
Backport 2.28: Restore full compat testing
2022-03-28 18:31:25 +02:00
Ronald Cron
e7dad1f616 ssl_tls.c: Fix inappropriate use of ssl context
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2022-03-28 12:16:56 +02:00
Ronald Cron
f1ed5951e3 ssl_srv.c: Mark ETM as disabled if cipher is not CBC
Encrypt-Then-Mac (ETM) is supported in Mbed TLS
server for TLS version geater than SSLv3 and only
for the CBC cipher mode thus make it
clear in the SSL context.

The previous code was ok as long as the check of
the ETM status was done only in the case of the CBC
cipher mode but fragile as #5573 revealed.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2022-03-28 12:16:13 +02:00
Ronald Cron
c2e2876e0e compat.sh: Fix check for OpenSSL support
If OpenSSL does not support a mode (tls12 or
dtls12 or tls13) just skip the tests involving
OpenSSL.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2022-03-25 16:32:38 +01:00
Ronald Cron
01e3c37f7b compat.sh: Restore full TLS compatibility testing
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2022-03-25 16:32:38 +01:00
Dave Rodgman
ce514def84
Merge pull request #5563 from AndrzejKurek/timeless-2.28
Backport 2.28: Fix builds with MBEDTLS_HAVE_TIME disabled and test
2022-03-15 16:43:18 +00:00
Dave Rodgman
2f39f191e3
Merge pull request #5603 from tom-cosgrove-arm/fix_test_md_api_violation-2.28
Backport 2.28: Fix test md api violation 2.28
2022-03-10 09:21:52 +00:00