Ronald Cron
3e47eec431
tls13: srv: Simplify resumption detection
...
Avoid marking we resume and then
cancelling it.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
e8c162d7ba
tls13: srv: Simplify kex availability checks
...
Regarding the possibility of selecting a
key exchange mode, the check of the ticket
flags is now separated from the check of
the ClientHello content and server
configuration.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
79cdd4156f
tls13: srv: Improve key exchange mode determination
...
For PSK based key exchange modes do not check twice
anymore if they can be selected or not. Check it
only when looping over the offered PSKs to select
one.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
1f63fe4d74
tls13: srv: Fix resume flag in case of cancelled PSK
...
If we prefer ephemeral key exchange mode over
the pure PSK one, make sure the resume flag is
disabled as eventually we are not going to
resume a session even if we aimed to at some
point.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
cf284565c5
tls13: srv: Determine best key exchange mode for a PSK
...
Determine best key exchange for for ticket based and
external PSKs.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
89089cc69b
tls13: srv: Factorize ciphersuite selection code
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
f7e9916b3d
tls13: srv: Fix MBEDTLS_SSL_SESSION_TICKETS guard position
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
12e72f1664
tls13: srv: Always parse the pre-shared key extension
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
7a30cf5954
tls13: srv: Stop earlier identity check
...
If an identity has been determined as a
ticket identity but the ticket is not
usable, do not try to check if the
identity is that of an external
provided PSK.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
fbae94a52f
tls13: srv: Improve ticket identity check return values
...
Improve the values returned by
ssl_tls13_offered_psks_check_identity_match_ticket().
Distinguish between the two following cases:
1) the PSK identity is not a valid ticket identity
2) the PSK identity is a valid ticket identity but
the ticket cannot be used for session resumption.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
3cdcac5647
tls13: srv: Fix return value
...
Fix the value returned by
ssl_tls13_offered_psks_check_identity_match_ticket()
when there is no ticket parser function defined
or no time.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Ronald Cron
6e31127f08
tls13: srv: Define specific return macros for binder check
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-03-08 08:43:41 +01:00
Paul Elliott
8a2062c538
Merge pull request #8892 from paul-elliott-arm/add_threading_to_drivers
...
Ensure drivers have threading enabled if required
2024-03-06 14:35:49 +00:00
Gilles Peskine
31403a4ca8
Merge pull request #8678 from daverodgman/quietbuild
...
Make builds less verbose
2024-03-05 18:04:16 +00:00
Gilles Peskine
71cc260563
Merge pull request #8728 from minosgalanakis/features/add_mbedtls_x509_crt_get_ca_istrue_accesor_6151
...
[MBEDTLS_PRIVATE] Add mbedtls_x509_crt_get_ca_istrue() accesor
2024-03-05 18:04:06 +00:00
Dave Rodgman
3c4166aef3
Merge pull request #8863 from minosgalanakis/feature/add_ecdh_context_5016
...
[MBEDTLS_PRIVATE] Add a getter for the ECDH context->grp.id member.
2024-03-05 16:58:13 +00:00
Minos Galanakis
581e63637a
test_suite_x509parse: Added test-case for legacy certificate
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-05 14:39:23 +00:00
Paul Elliott
053b7886e5
Ensure drivers have threading enabled if required
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-03-05 14:27:23 +00:00
Minos Galanakis
87b4f6d86c
x509: Reworded documentation bits.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-05 11:05:51 +00:00
Gilles Peskine
d06244b813
Merge pull request #8821 from davidhorstmann-arm/fix-config-bitflag
...
Update `SSL_SERIALIZED_SESSION_CONFIG_BITFLAG` with new flags
2024-03-05 09:59:42 +00:00
Gilles Peskine
8462146d01
Merge pull request #8867 from gilles-peskine-arm/psa_key_attributes-remove_core
...
Merge psa_core_key_attributes_t back into psa_key_attributes_t
2024-03-05 09:59:24 +00:00
Paul Elliott
634f4d6d7d
Merge pull request #8846 from gilles-peskine-arm/ecp-write-ext-3.6
...
Introduce mbedtls_ecp_write_key_ext
2024-03-04 14:56:55 +00:00
Gilles Peskine
fad79fcdd9
Merge remote-tracking branch 'development' into ecp-write-ext-3.6
...
Conflicts:
* library/pk.c: mbedtls_pk_wrap_as_opaque() changed in the feature branch
and was removed in the target branch.
2024-03-04 08:52:08 +01:00
Minos Galanakis
79ee110446
Added changelog
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-04 02:22:01 +00:00
Minos Galanakis
a83ada4eba
tests: Added test for mbedtls_x509_crt_get_ca_istrue()
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-04 02:22:01 +00:00
Minos Galanakis
2abbac74dc
x509: Added mbedtls_x509_crt_get_ca_istrue()
API accessor.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-04 02:22:01 +00:00
Minos Galanakis
3cfdd73dfa
Changelog: Added changelog for mbedtls_ecdh_get_grp_id
.
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-02 09:14:13 +00:00
Manuel Pégourié-Gonnard
e33b349c90
Merge pull request #8864 from valeriosetti/issue8848
...
Deprecate or remove mbedtls_pk_wrap_as_opaque
2024-03-01 15:54:32 +00:00
David Horstmann
71fa1a94e7
Fix code style
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-01 12:32:18 +00:00
David Horstmann
76ba26a542
Fixup: add peer_cert_digest_type to comment
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-01 12:03:35 +00:00
David Horstmann
7335082ef6
Add ChangeLog entry for ssl serialization bitflags
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-01 11:31:03 +00:00
David Horstmann
f686f1dc17
Fix naming inconsistencies in config bits
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-01 11:20:32 +00:00
Dave Rodgman
79aaaa46e9
Fix formatting
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 18:41:36 +00:00
David Horstmann
531aca2810
Fix missing fields in ssl session struct comment
...
The endpoint and version were factorized out into the main session.
Update the session struct comment to reflect these new fields, as was
previously missed.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-29 18:14:28 +00:00
David Horstmann
cb01b361e1
Move session descriptions into a single comment
...
Describe the TLS 1.2, TLS 1.3 and full session structs in the same
place for ease of reference.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-29 18:10:13 +00:00
David Horstmann
80a9668762
Add config guards to session struct comments
...
This shows which fields of the session are dependent on which config
options.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-29 18:00:32 +00:00
David Horstmann
e59f970f28
Move session functions to same part of file
...
Ensure that session save and load functions are not scattered
throughout ssl_tls.c but are in the same part of the file.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-29 17:50:44 +00:00
David Horstmann
92b258bb50
Update ssl session serialization config bitflag
...
Add config bits for server name indication, early data and record size
limit, which all cause the serialized session to be structured
differently.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-02-29 17:41:31 +00:00
David Horstmann
5c5a32f52a
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-29 17:41:31 +00:00
Valerio Setti
d32dd08934
changelog: fix description
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-02-29 16:28:03 +01:00
Dave Rodgman
87218b364d
blank line for readability
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 15:02:30 +00:00
Dave Rodgman
869e310456
Use export to set VERBOSE_LOGS
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 15:02:27 +00:00
Ronald Cron
9b4e964c2c
Merge pull request #8760 from ronald-cron-arm/tls13-write-early-data
...
TLS 1.3: Add mbedtls_ssl_write_early_data() API
2024-02-29 14:31:55 +00:00
Dave Rodgman
5f7862a567
Fix docs
...
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:14:37 +00:00
Dave Rodgman
a3e694c2ad
simplify printf call
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:06:49 +00:00
Dave Rodgman
63c94a36f1
improve docs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:06:36 +00:00
Dave Rodgman
2096478034
Add editor hint for emacs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:06:19 +00:00
Dave Rodgman
1f08a3248e
Rename quiet to quiet.sh
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2024-02-29 14:04:59 +00:00
Valerio Setti
4ee6f81195
add changelog
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-02-29 15:01:21 +01:00
Minos Galanakis
b4ce628b64
tests: Added test for mbedtls_ecdh_context_grp
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-02-29 13:31:34 +00:00