8dde3b3dec
Replace MBEDTLS_PK_HAVE_ECC_KEYS with PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-08-05 15:41:58 +01:00
0916cd702f
Replace MBEDTLS_MD_CAN_SHA256 with PSA_WANT_ALG_SHA_256
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-07-11 11:13:35 +03:00
dcf18dd876
Update paths pointing to tests/data_files
...
These now point to framework/data_files instead.
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2024-07-05 15:49:03 +01:00
2cf41a273e
Merge pull request #9171 from eleuzi01/replace-mbedtls-md-can-sha384
...
Replace MBEDTLS_MD_CAN_SHA384 with PSA_WANT_ALG_SHA_384
2024-07-04 08:56:52 +00:00
b476d4bf21
Replace MBEDTLS_MD_CAN_SHA384 with PSA_WANT_ALG_SHA_384
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-07-03 10:20:41 +01:00
fcc9afaf9d
Replace MBEDTLS_MD_CAN_SHA224 with PSA_WANT_ALG_SHA_224
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-07-02 11:08:04 +01:00
aa82464dec
Merge pull request #8897 from IVOES/cpp/unbounded-write
...
ssl_mail_client: Fix unbounded write of sprintf()
2024-05-02 16:06:23 +00:00
d97b96f2ec
ssl_mail_client: Fix code style issue
...
Signed-off-by: Mingjie Shen <shen497@purdue.edu >
2024-03-18 14:30:06 -04:00
74191a56e8
ssl_server2: Split early data enablement from max_early_data_size setting
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-14 20:00:42 +01:00
8e35d96057
ssl_mail_client: Check return value of mbedtls_snprintf
...
The return value of snprintf() is the number of characters (excluding
the null terminator) which would have been written to the buffer if
enough space had been available. Thus, a return value of size or more
means the output was truncated.
Signed-off-by: Mingjie Shen <shen497@purdue.edu >
2024-03-12 16:23:41 -04:00
0fc20cd447
ssl_mail_client: Replace snprintf with mbedtls_snprintf
...
Signed-off-by: Mingjie Shen <shen497@purdue.edu >
2024-03-12 16:00:28 -04:00
7201bc6b05
ssl_client2: Fix early data log
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-03-08 16:03:09 +01:00
7d08983cb2
ssl_mail_client: Fix unbounded write of sprintf()
...
These calls to sprintf may overflow buf because opt.mail_from and opt.mail_to
are controlled by users. Fix by replacing sprintf with snprintf.
Signed-off-by: Mingjie Shen <shen497@purdue.edu >
2024-03-05 18:13:28 -05:00
e33b349c90
Merge pull request #8864 from valeriosetti/issue8848
...
Deprecate or remove mbedtls_pk_wrap_as_opaque
2024-03-01 15:54:32 +00:00
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
90eca2adb0
ssl_test_lib: add guards for pk_wrap_as_opaque()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-02-28 10:45:43 +01:00
7541ebea52
programs: remove usage of mbedtls_pk_wrap_as_opaque() from tests
...
This is replaced with: mbedtls_pk_get_psa_attributes() +
mbedtls_pk_import_into_psa() + mbedtls_pk_setup_opaque().
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-02-27 10:44:33 +01:00
7f72a06e02
Remove cruft
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-02-22 18:41:25 +01:00
74589ba31c
ssl_context_info: explicitly note accesses to private fields
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-02-22 12:12:01 +01:00
72da8b3521
Don't authorize private access to fields where not actually needed
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2024-02-22 12:07:29 +01:00
0aead12706
ssl_client2: Improve loop writing early data
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-21 17:37:33 +01:00
b4fd47e897
ssl_client2: Default to library default for early data enablement
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-21 17:37:33 +01:00
0ecb5fd6f5
Merge pull request #8574 from ronald-cron-arm/ssl-tickets
...
Fix and align ticket age check in ssl_ticket.c for TLS 1.2 and TLS 1.3
2024-02-21 09:38:46 +00:00
028a38b7cb
Merge pull request #8661 from BensonLiou/use_init_api
...
use mbedtls_ssl_session_init() to init session variable
2024-02-19 15:49:34 +00:00
54ad01efed
Merge remote-tracking branch 'upstream/development' into make_tests_thread_safe
2024-02-09 14:33:58 +00:00
7a28738205
Merge pull request #8636 from paul-elliott-arm/new_test_thread_interface
...
New test thread interface
2024-02-08 12:35:40 +00:00
1d7bc1ecdf
Merge pull request #8717 from valeriosetti/issue8030
...
PSA FFDH: feature macros for parameters
2024-02-07 10:06:03 +00:00
a5561893e7
ssl_client2: Add support for early data writing
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-07 08:06:46 +01:00
2fe0ec8c31
ssl_client2: Add buffer overflow check
...
Add buffer overflow check to build_http_request().
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-07 08:06:46 +01:00
ccfaefa361
ssl_client2: Switch from int to size_t
...
Switch from int to size_t for some
data lengths and counter local
variables.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-07 08:06:46 +01:00
4e1bd470fb
ssl_client2: Move code to build http request
...
Move code to build http request into a
dedicated function.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-07 08:06:46 +01:00
54a3829453
ssl_client2: Simplify early_data option
...
No need to define specific early data,
the idea is rather to just send the
usual request data as early data
instead of standard application data.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-07 08:06:46 +01:00
192e0f9b1d
ssl_server2: Add read early data support
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-02-01 16:40:47 +01:00
7fd162ec26
Refactor common PThreads CMake code
...
Move the flags and find of Threads to root CMakeLists.txt, rather
than duplicate these everywhere. Make explicit linking of library with
PThreads use the same mechanism.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-24 18:05:53 +00:00
85ea3e623b
Set preferences before finding Threads in CMake
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-19 15:57:22 +00:00
e8683ce9ef
ssl_test_lib: add guards for enabled DH groups
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2024-01-17 15:56:30 +01:00
d1c106c787
Define ticket creation time in TLS 1.2 case as well
...
The purpose of this change is to eventually base
the calculation in ssl_ticket.c of the ticket age
when parsing a ticket on the ticket creation time
both in TLS 1.2 and TLS 1.3 case.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-01-15 08:58:19 +01:00
3a6059beca
Merge pull request #7455 from KloolK/record-size-limit/comply-with-limit
...
Comply with the received Record Size Limit extension
2024-01-09 15:22:17 +00:00
4068c7e47c
Link programs with pthread via cmake
...
All programs are now linked directly with all test code, thus adding a
pthread abstraction into the test code means having to link the programs
with pthread (if the library is found under cmake).
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:04:52 +00:00
17c119a5e3
Migrate to threading_helpers.h
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 21:04:52 +00:00
4580d4d829
Add accessor helpers for mbedtls_test_info
...
Step one of being able to control access to mbedtls_test_info with
a mutex.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-01-05 19:13:43 +00:00
6d0a093582
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 >
2023-12-27 22:03:24 +08:00
a211bb7f01
Merge pull request #8596 from xkqian/tls13_early_data_input_file
...
Change early data flag to input file
2023-12-11 21:14:57 +00:00
a9581d2d5f
Fix CI failure of uninitialized fp
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-12-11 01:50:34 +00:00
aedfc0932b
Revert to ae952174a7
and addressing some comments
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-12-08 10:43:24 +00:00
963468035d
Add the test framework of early data
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-12-07 09:19:43 +00:00
daddfb520d
Open the file once read in the file path
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-12-07 08:14:30 +00:00
35c026c09e
Read early data file
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-12-07 06:10:34 +00:00
2a8035b495
Add read early data code
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-12-07 03:54:40 +00:00
57db590586
Rework to revert the early_data enabled flag
...
We have two options for early data.
early_data to indicate early data enable or not.
early_data_file to provide path file to read early data from
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-12-07 03:29:22 +00:00