f16efbc78d
fix various issues
...
- Add comments for ticket test hooks
- improve code style.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-11-21 09:58:18 +08:00
cebffc3446
change time unit of ticket to milliseconds
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-11-21 09:58:18 +08:00
97137f91b6
Merge pull request #7071 from yuhaoth/pr/tls13-ticket-add-max_early_data_size-field
...
TLS 1.3 EarlyData: add `max_early_data_size` field for ticket
2023-11-20 08:04:57 +00:00
53199b1c0a
Merge pull request #6720 from yuhaoth/pr/tls13-early-data-receive-0_rtt-and-eoed
...
TLS 1.3: EarlyData SRV: Write early data extension in EncryptedExtension
2023-11-07 13:59:13 +00:00
4122c16abd
Merge pull request #6945 from lpy4105/issue/6935/ticket_flags-kex-mode-determination
...
TLS 1.3: SRV: Check ticket_flags on kex mode determination when resumption
2023-11-07 09:26:21 +00:00
7ef9fd8989
fix various issues
...
- Debug message
- Improve comments
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-11-07 14:31:37 +08:00
2bea94ce2e
check the ticket version unconditional
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-11-07 14:18:17 +08:00
44670c6eda
Revert "TLS 1.3: SRV: Don't select ephemeral mode on resumption"
...
This reverts commit dadeb20383
.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com >
2023-11-07 09:58:53 +08:00
16799db69a
update headers
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-02 19:47:20 +00:00
82fd6c11bd
Add selected key and ciphersuite check
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-11-01 10:32:17 +08:00
ce3b95e2c9
move ticket version check
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-11-01 10:32:17 +08:00
454dda3e25
fix various issues
...
- improve output message
- Remove unnecessary checks
- Simplify test command
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-11-01 10:28:43 +08:00
dbd1e0d986
tls13: add helpers to check if psk[_ephemeral] allowed by ticket
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com >
2023-10-31 10:17:17 +08:00
29daf4a36b
tls13: server: fully check ticket_flags with available kex mode.
...
We need to fully check if the provided session ticket could be
used in the handshake, so that we wouldn't cause handshake
failure in some cases. Here we bring f8e50a9
back.
Example scenario:
A client proposes to a server, that supports only the psk_ephemeral
key exchange mode, two tickets, the first one is allowed only for
pure PSK key exchange mode and the second one is psk_ephemeral only.
We need to select the second tickets instead of the first one whose
ticket_flags forbid psk_ephemeral and thus cause a handshake
failure.
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com >
2023-10-31 09:34:14 +08:00
cfb23b8090
tls13: server: parse pre_shared_key only when some psk is selectable
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com >
2023-10-30 15:26:26 +08:00
71c14f1db6
write early data indication in EE msg
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-10-27 10:52:49 +08:00
985c967a14
tls13: add more checks for server early data
...
- check if it is enabled
- check if it is psk mode
- check if it is resumption
- check if it is tls13 version
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-10-27 10:52:27 +08:00
7b711710b2
Add check_ticket_flags helper function
...
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com >
2023-10-24 17:07:14 +08:00
ed5e4e86a5
Merge branch 'development' into issue/6935/ticket_flags-kex-mode-determination
2023-10-18 18:03:07 +08:00
b47b2990d6
fix various issues
...
- fix wrong typo
- remove redundant check
- remove psk mode tests
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-10-18 15:50:35 +08:00
ab0da370a4
Add early data status update
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-10-12 15:02:01 +08:00
33bf240e53
Add max_early_data_size into copy list
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-10-12 15:00:26 +08:00
2eab462a8c
Fix IAR warnings
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-05 13:30:37 +01:00
de8f56e936
Merge pull request #7884 from valeriosetti/issue7612
...
TLS: Clean up (EC)DH dependencies
2023-08-01 07:13:36 +00:00
c9ae862225
tls: use TLS 1.3 guards in ssl_tls13 modules
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-07-25 11:23:50 +02:00
ea59c43499
tls: fix a comment a rename a variable/symbol
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-07-25 11:14:03 +02:00
6aca2c9613
Merge pull request #7716 from mpg/psa-util-internal
...
Split psa_util.h between internal and public
2023-07-10 18:33:23 +02:00
5c41ae867b
Merge pull request #7887 from ronald-cron-arm/fix-hrr-in-psk-kem
...
tls13: server: Fix spurious HRR
2023-07-10 09:58:13 +02:00
3d237b5ff1
ssl_misc: fix guards for PSA data used in XXDH key exchanges
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2023-07-07 19:02:16 +02:00
8a74f07c2a
tls13: server: Fix spurious HRR
...
If the server during a TLS 1.3 handshake selects
the PSK key exchange mode, it does not matter
if it did not find in the key share extension
a key share for a group it supports. Such a
key share is used and necessary only in the
case of the ephemeral or PSK ephemeral key
exchange mode. This is a possible scenario in
the case of a server that supports only the PSK
key exchange mode and a client that also
supports a key exchange mode with ephemeral keys.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-07-07 15:53:12 +02:00
d55d66f5ec
Fix missing includes
...
Some files relied on psa_util.h to provide the includes they need.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-07-06 12:47:28 +02:00
408569f91a
Adapt function name: mbedtls_ssl_tls13_generate_and_write_dh_key_exchange
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-07-06 12:16:44 +02:00
7ac93bea8c
Adapt names: dh -> xxdh
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-07-05 09:26:26 +02:00
d5f79e7297
Adapt functions names for ffdh
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-07-05 09:26:26 +02:00
56b159a12a
Merge pull request #7627 from mprse/ffdh_tls13_v2
...
Make use of FFDH keys in TLS 1.3 v.2
2023-07-03 10:12:33 +02:00
8c0a95374f
Adapt remaining guards to FFDH
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-06-15 17:07:10 +02:00
29c219c285
Combine mbedtls_ssl_tls13_generate_and_write_ecdh/ffdh_key_exchange functions
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-06-06 12:31:09 +02:00
63706628d0
Adapt guards for FFDH
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-06-06 12:31:08 +02:00
c89f3ea9f2
Add support for FFDH in TLS 1.3
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-06-06 12:31:08 +02:00
02b10d8266
Add missing include
...
Fix build failures with config full
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-06 10:33:54 +02:00
1f2a587cdf
Use actual function instead of static inline
...
Large static inline functions used from several translation units in the
library are bad for code size as we end up with multiple copies. Use the
actual function instead. There's already a comment that says so.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-06 10:33:54 +02:00
2d6d993662
Use MD<->PSA functions from MD light
...
As usual, just a search-and-replace plus:
1. Removing things from hash_info.[ch]
2. Adding new auto-enable MD_LIGHT in build-info.h
3. Including md_psa.h where needed
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-06 10:33:54 +02:00
da609130f3
fix: correct calling to time function in tls13 client&server
...
Call `mbedtls_time` to handle the case when MBEDTLS_PLATFORM_TIME_MACRO is defined
Signed-off-by: Yuxiang Cao <yuxiang.cao@fortanix.com >
2023-05-22 13:22:00 -07:00
49f39c1e91
Fix the wrong debug _message function to _ret
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-04-10 08:29:17 +00:00
09c3cccf97
Update the todo comment of record size limits
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-04-10 08:29:17 +00:00
8bce0e6f5e
Update group ext debug message in ssl_tls13_server.c
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-04-10 08:29:17 +00:00
9f1747bb1f
Wrap lines which exceed 80 chars in ssl_tls13_server.c
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-04-10 08:29:14 +00:00
dad02b2bec
tls13: srv: Fix comment
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-04-06 10:32:05 +02:00
e45afd760d
Use specific pointer to loop over proposed cipher suites
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-04-06 10:32:01 +02:00
eff5673e09
Improve and align variable names for supported versions data
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2023-04-06 10:26:18 +02:00