31182 Commits

Author SHA1 Message Date
David Horstmann
4c8ca72a88 Move some ChangeLog entries to a different section
2 ChangeLog entries that were originally placed under "Changes" are
more appropriately placed under "Default behaviour changes".

Move these 2 entries to the correct section.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-08-28 20:58:24 +01:00
David Horstmann
fedf9a2096 Add CVE IDs to security ChangeLog
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-08-28 20:56:16 +01:00
David Horstmann
18f3bebb6f Update BRANCHES.md
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-08-28 20:56:16 +01:00
David Horstmann
0d1117692e Add generated files
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-08-28 20:56:16 +01:00
David Horstmann
ea44fa7f35 Finalise ChangeLog
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-08-28 20:56:16 +01:00
David Horstmann
1d2dcfce6f Bump version to 3.6.1
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-08-28 20:56:16 +01:00
David Horstmann
9cf929d421 Assemble ChangeLog
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-08-28 20:56:16 +01:00
David Horstmann
636367f757 Don't clean test_keys.h and test_certs.h
This is in keeping with other generated files (such as generated .data
files) that are added to releases.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-08-28 20:56:16 +01:00
David Horstmann
204c4b41f5 Fix typos in make clean target for Windows
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-08-28 20:56:16 +01:00
David Horstmann
9f10979853 Merge branch 'mbedtls-3.6-restricted' into mbedtls-3.6.1rc0-pr
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-08-28 20:48:27 +01:00
Gilles Peskine
72064b202e
Merge pull request #9507 from ronald-cron-arm/disable-new-session-tickets
3.6: Disable new session tickets at runtime
2024-08-28 18:20:56 +00:00
Ronald Cron
c46edd4423 Fix/Improve documentation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 18:15:36 +02:00
Ronald Cron
9f44c883f4 Rename some "new_session_tickets" symbols
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 17:47:46 +02:00
Ronald Cron
c9884b04ad Fix change log
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 16:36:07 +02:00
Ronald Cron
48a9f562ba Improve documentation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 13:36:43 +02:00
Ronald Cron
ba45a44f13 Move session tickets getter functions to ssl_misc.h
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 13:22:26 +02:00
Ronald Cron
31b40b3600 Add change logs
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 10:42:01 +02:00
Ronald Cron
97dc5832c5 Improve debug logs
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 10:42:01 +02:00
Ronald Cron
fc76718dcd Move MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET doc
Move MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET
error code documentation to the documentation of
mbedtls_ssl_read() as we cannot have long error
descriptions because of a limitation in
generate_errors.pl.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 10:42:01 +02:00
Ronald Cron
d67f801c63 Do not add a new field in the SSL config
We cannot add a new field in SSL config in
an LTS. Use `session_tickets` field instead.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 10:41:54 +02:00
Ronald Cron
57ad182644 ssl_client2: Fix new_session_tickets option parsing
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 10:30:24 +02:00
Ronald Cron
e55659d576 Document NewSessionTicket handling being disabled by default
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-28 10:30:17 +02:00
Ronald Cron
9df056390a Improve MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET documentation
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-27 18:04:44 +02:00
Ronald Cron
0e5d4fdfc5 Document MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-27 16:20:47 +02:00
Ronald Cron
23303a47f4 Enable TLS 1.3 ticket handling in resumption tests
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-27 16:20:40 +02:00
Ronald Cron
b675b2ba5d TLS 1.3: Ignore tickets if disabled at runtime
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-27 15:41:24 +02:00
Ronald Cron
bedddd707a Add mbedtls_ssl_conf_enable_new_session_tickets() API
Add mbedtls_ssl_conf_enable_new_session_tickets() API
to be able to enable and disable the handling of TLS 1.3
NewSessionTicket messages.

The TLS 1.2 equivalent function is named
mbedtls_ssl_conf_session_tickets() thus the most
natural name would have been
mbedtls_ssl_conf_new_session_tickets() but it is
already used on server side thus rather
mbedtls_ssl_conf_enable_new_session_tickets().

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-08-27 15:41:18 +02:00
Gilles Peskine
7defa41fb3
Merge pull request #9501 from gilles-peskine-arm/tls13-psa-init-auto-3.6
[3.6] TLS 1.3: call psa_crypto_init
2024-08-26 15:26:35 +00:00
Manuel Pégourié-Gonnard
8b8228ce2e
Merge pull request #1282 from gilles-peskine-arm/merge-3.6-restricted-20240823
Merge 3.6 into -restricted
2024-08-26 12:07:24 +02:00
Gilles Peskine
57dbd69945 TLS 1.3 server: move crypto_init after protocol negotiation
This reduces the workflows where psa_crypto_init is called when not
necessary: it won't be called when a dual-version server receives a 1.2-only
ClientHello.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-26 12:04:39 +02:00
Gilles Peskine
aa6ef7da50 Changelog entry for psa_crypto_init potentially being called from TLS
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-26 12:01:31 +02:00
Gilles Peskine
92e803ea5b Clarify "negotiating"
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-26 11:59:48 +02:00
Gilles Peskine
50476272a9 Error translation and init are needed in PSK-only builds as well
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-26 09:28:41 +02:00
Gilles Peskine
069bccdf78 Call psa_crypto_init in the library when required for TLS 1.3
For backward compatibility with Mbed TLS <=3.5.x, applications must be able
to make a TLS connection with a peer that supports both TLS 1.2 and TLS 1.3,
regardless of whether they call psa_crypto_init(). Since Mbed TLS 3.6.0,
we enable TLS 1.3 in the default configuration, so we must take care of
calling psa_crypto_init() if needed. This is a change from TLS 1.3 in
previous versions, where enabling MBEDTLS_SSL_PROTO_TLS1_3 was a user
choice and could have additional requirement.

This commit makes the library call psa_crypto_init() when it needs PSA
crypto in a situation where the application might not have called it,
namely, when starting a TLS 1.3 connection.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-25 10:44:39 +02:00
Gilles Peskine
cd4da16eea Don't call psa_crypto_init in test programs when not required for TLS 1.3
For backward compatibility with Mbed TLS <=3.5.x, applications must be able
to make a TLS connection with a peer that supports both TLS 1.2 and TLS 1.3,
regardless of whether they call psa_crypto_init(). Since Mbed TLS 3.6.0,
we enable TLS 1.3 in the default configuration, so we must take care of
calling psa_crypto_init() if needed. This is a change from TLS 1.3 in
previous versions, where enabling MBEDTLS_SSL_PROTO_TLS1_3 was a user
choice and could have additional requirement.

This commit changes our test programs to validate that the library
does not have the compatibility-breaking requirement.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-25 10:44:39 +02:00
Gilles Peskine
5950301740 Don't call psa_crypto_init in unit tests when not required for TLS 1.3
For backward compatibility with Mbed TLS <=3.5.x, applications must be able
to make a TLS connection with a peer that supports both TLS 1.2 and TLS 1.3,
regardless of whether they call psa_crypto_init(). Since Mbed TLS 3.6.0,
we enable TLS 1.3 in the default configuration, so we must take care of
calling psa_crypto_init() if needed. This is a change from TLS 1.3 in
previous versions, where enabling MBEDTLS_SSL_PROTO_TLS1_3 was a user
choice and could have additional requirement.

This commit changes our unit tests to validate that the library
does not have the compatibility-breaking requirement.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-25 10:44:39 +02:00
Gilles Peskine
590bdcbddf Call psa_crypto_init in the library when required for TLS 1.3: doc
For backward compatibility with Mbed TLS <=3.5.x, applications must be able
to make a TLS connection with a peer that supports both TLS 1.2 and TLS 1.3,
regardless of whether they call psa_crypto_init(). Since Mbed TLS 3.6.0,
we enable TLS 1.3 in the default configuration, so we must take care of
calling psa_crypto_init() if needed. This is a change from TLS 1.3 in
previous versions, where enabling MBEDTLS_SSL_PROTO_TLS1_3 was a user
choice and could have additional requirement.

This commit removes the compatibility-breaking requirement from the
documentation.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-25 10:44:39 +02:00
Gilles Peskine
4002e6fdee Merge remote-tracking branch 'mbedtls-3.6' into mbedtls-3.6-restricted 2024-08-23 11:15:11 +02:00
Gilles Peskine
86a4c25136
Merge pull request #9499 from waleed-elmelegy-arm/fix-legacy-compression-issue-3.6
[Backport 3.6] Fix issue in handling legacy_compression_methods in ssl_tls13_parse_client_hello()
2024-08-22 18:23:33 +00:00
Gilles Peskine
df0ef8a624
Merge pull request #9281 from mpg/rsapub
[3.6] Reduce performance regression in RSA public operations
2024-08-22 16:50:38 +00:00
Waleed Elmelegy
8ac9caf89b Fix the capitalisation in the changelog entry
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-22 16:42:18 +00:00
Waleed Elmelegy
d930a3e950 Reduce the wording in changelog entry
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-22 16:39:39 +00:00
Waleed Elmelegy
5183e1ab17 Improve the changelog entry for fixing legacy compression issue
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-22 16:39:21 +00:00
Waleed Elmelegy
f669fef856 Add chanelog entry for fixing legacy comprssion methods issue
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-22 16:15:06 +00:00
Waleed Elmelegy
1297309fdb Remove redundant legacy compression test
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-22 15:50:46 +00:00
Waleed Elmelegy
38c8757b2c Improve legacy compression regression testing
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-22 15:50:46 +00:00
Waleed Elmelegy
790f3b16d4 Add regression testing to handling Legacy_compression_methods
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-22 15:50:45 +00:00
Waleed Elmelegy
a1c4f4cab6 Improve comments explaining legacy_methods_compression handling
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-22 15:50:45 +00:00
Waleed Elmelegy
3918598e52 Correct a small typo in ssl_tls13_parse_client_hello()
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-22 15:50:45 +00:00
Waleed Elmelegy
566ed54d6e Improve handling of legacy_compression_methods in ssl_tls13_parse_client_hello()
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-08-22 15:50:45 +00:00