Valerio Setti
5ad2bfa6c8
library: ssl: adjust return type of mbedtls_psa_alg_from_pk_sigalg()
...
The correct return type should have been "psa_algorithm_t" since the
beginning because this is what the function really returns and this is
what the returned value is then used for in the calling functions.
Change also the returned value in the default case from
MBEDTLS_PK_SIGALG_NONE to PSA_ALG_NONE in order to return the same type
as in other cases of the switch case.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-12-09 16:15:48 +01:00
Valerio Setti
d8f0b37d1a
ssl: replace remaining occurrence of pk_can_do with pk_get_key_type
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-12-05 15:57:39 +01:00
Valerio Setti
9eb5b2a146
x509: replace usage of mbedtls_pk_can_do() with mbedtls_pk_get_key_type()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-12-04 16:28:44 +01:00
Valerio Setti
902467d62f
ssl: replace usage of mbedtls_pk_can_do() with mbedtls_pk_get_key_type()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-12-04 16:28:44 +01:00
Valerio Setti
1de094fb32
library: x509: replace mbedtls_pk_can_do() with mbedtls_pk_can_do_psa()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-12-04 16:28:44 +01:00
Valerio Setti
9d1fa1a8d8
library: x509: change order of checks in x509_crt_check_signature()
...
Checking that parent PK type is OK is definitely faster than computing
an hash, so invert the checks.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-12-04 16:28:44 +01:00
Valerio Setti
81a5a0914c
library: ssl: replace mbedtls_pk_can_do() with mbedtls_pk_can_do_psa()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-12-04 16:28:44 +01:00
Valerio Setti
92926ff4dc
library: common: add helper to get PSA algorithm from PK sigalg
...
Add a simple helper to convert from PK sigalg to PSA algorithm. This is
handy when calling mbedtls_pk_can_do_psa() knowing the PK sigalg and the
used MD type.
This is being added in a separate file because it's meant to be consumed
by both ssl and x509 modules. It was not added to tf-psa-crypto because
this is only needed on the mbedtls repo and doing so reduce interdependencies
between the repos.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-12-04 16:28:44 +01:00
Valerio Setti
024c3aeb9e
library: ssl: remove duplicate check in ssl_parse_server_key_exchange()
...
The check being removed is already done few lines above so there is no
need to repeat it twice.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-12-04 16:28:44 +01:00
Manuel Pégourié-Gonnard
5341c86877
Add comments for remaining internal includes
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-12-02 12:35:20 +01:00
Manuel Pégourié-Gonnard
ea5718721f
Remove two more useless internal includes
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-12-02 12:06:39 +01:00
Manuel Pégourié-Gonnard
3e6455d50e
Remove useless includes of psa_util_internal
...
Those in SSL modules were redundant because it's already included from
ssl_misc.h.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-12-02 12:00:34 +01:00
Manuel Pégourié-Gonnard
411282d126
x509: rm useless private include in C file
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-12-01 11:06:02 +01:00
Manuel Pégourié-Gonnard
eab6d3276b
ssl: rm useless private include in C file
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-12-01 10:26:28 +01:00
Manuel Pégourié-Gonnard
c53c43c296
x509: rm useless private includes in internal headers
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-12-01 10:24:50 +01:00
Manuel Pégourié-Gonnard
4b663abecc
ssl: rm useless private includes in internal headers
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-12-01 10:24:41 +01:00
Valerio Setti
caf73f885a
library: check_config: remove references to secp192 curves
...
Support for these curves is being removed from tf-psa-crypto, so we need
to remove all the references also in this repo.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-11-20 13:01:18 +01:00
Juha-Pekka Kesonen
5f4cbcd336
ssl_tls12: change log level for ECDH computation
...
Signed-off-by: Juha-Pekka <juha-pekka.kesonen@nordicsemi.no >
2025-11-05 14:10:52 +02:00
Juha-Pekka Kesonen
666fa2da3d
ssl_msg.c: change log level for record checking
...
Signed-off-by: Juha-Pekka <juha-pekka.kesonen@nordicsemi.no >
2025-11-05 14:08:46 +02:00
Valerio Setti
00d579e953
Merge pull request #10439 from bjwtaylor/remove-all-non-ext-apis
...
Remove all non ext apis
2025-11-04 09:53:34 +00:00
Gilles Peskine
18f2661c65
Merge pull request #10491 from valeriosetti/issue10229
...
Remove temporary fixes introduced in #10213
2025-11-04 08:59:16 +00:00
Valerio Setti
a35e332bbb
library: debug: remove temporary fixes for RSA key handling
...
Since crypto#308 has been merged:
- replace MBEDTLS_PK_USE_PSA_RSA_DATA with PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY
- remove "no-check-names"
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no >
2025-11-03 10:25:15 +01:00
Valerio Setti
525dd917dc
Merge pull request #10477 from Cube707/fix/iar-compiler-warning
...
add cast to fix IAR compiler errors
2025-10-31 12:33:26 +00:00
Ben Taylor
42074c193f
Rename mbedtls_ssl_get_pk_type_and_md_alg_from_sig_alg to mbedtls_ssl_get_pk_sigalg_and_md_alg_from_sig_alg
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-31 08:40:36 +00:00
Ben Taylor
b76c38334a
Update name of mbedtls_ssl_pk_alg_from_sig_pk_alg to mbedtls_ssl_pk_sig_alg_from_sig
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-31 08:40:25 +00:00
Ben Taylor
f21e63c6d0
Update pk_alg to use mbedtls_pk_sigalg_t and remove casts in library/x509write_csr.c
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-30 15:29:02 +00:00
Ben Taylor
00b04a6590
Update mbedtls_pk_sign_ext in x509write_crt.c to use mbedtls_pk_sigalg_t directly and remove casts
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-30 15:11:09 +00:00
Ben Taylor
5f037c7fb3
Rename mbedtls_ssl_pk_alg_from_sig to mbedtls_ssl_pk_alg_from_sig_pk_alg and update to use mbedtls_pk_sigalg_t
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-30 14:59:24 +00:00
Ben Taylor
0035cfb1f0
Removed unnecessary cast in mbedtls_pk_sign_ext
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-30 13:42:56 +00:00
Ben Taylor
4565d5d4e6
Change the call to mbedtls_pk_verify_ext in pkcs7 to have a variable input cert->sig_pk
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-30 13:37:09 +00:00
minosgalanakis
32b597bd31
Merge pull request #10469 from Begasus/includedir
...
Use GNUInstallDirs CMAKE_INSTALL_INCLUDEDDIR path for headers installation
2025-10-29 15:21:32 +00:00
Jan Wille
64e7d4b64b
format: apply suggestions (add spaces)
...
Signed-off-by: Jan Wille <jan.wille@siemens.com >
2025-10-29 15:49:10 +01:00
Jan Spannberger
a5384bdf09
add cast to fix IAR compiler errors
...
IAR throws a warning "mixed ENUM with other type"
Signed-off-by: Jan Spannberger <jan.spannberger@siemens.com >
2025-10-28 15:13:08 +01:00
Ben Taylor
bc076f9f76
fix style isses
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
a2de40a100
Change the return type of mbedtls_ssl_get_ciphersuite_sig_pk_alg to mbedtls_pk_sigalg_t
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
4b4ca812e5
Corrected debug return
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
10d471a14d
Correct debug return
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
b190c1bb0b
Replace change to restartable with ext
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
1b32994bef
Fix style issues
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
2c056721d1
Tidy up debug of non ext functions
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
cef9d2d31f
Revert change to mbedtls_pk_{sign,verify}_restartable and replace with ext version
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
5e23093285
Fix code style issues
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
c3e2b37530
Remove mbedtls_ssl_write_handshake_msg as it now replaced by mbedtls_ssl_write_handshake_msg_ext
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
279dd4ab59
Remove dependencies on mbedtls_pk_verify
...
Replace mbedtls_pk_verify with mbedtls_pk_verify_restartable, as mbedtls_pk_verify has now been
removed and was origonally a pass through call to mbedtls_pk_verify_restartable.
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Ben Taylor
94f1628aca
Remove dependencies on mbedtls_pk_sign
...
Replace mbedtls_pk_sign with mbedtls_pk_sign_restartable, as mbedtls_pk_sign has now been
removed and was origonally a pass through call to mbedtls_pk_sign_restartable.
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-28 07:58:37 +00:00
Valerio Setti
4624f508d3
Merge pull request #10449 from bjwtaylor/mbedtls.remove-mbedtls_verify_new
...
Remove uses of mbedtls_pk_verify_new
2025-10-24 14:12:24 +00:00
Luc Schrijvers
ffc2606bf2
Use GNUInstallDirs CMAKE_INSTALL_INCLUDEDDIR path for headers installation
...
Signed-off-by: Luc Schrijvers <begasus@gmail.com >
2025-10-24 12:50:51 +02:00
Ben Taylor
0ff335d715
Remove uses of mbedtls_pk_verify_new
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-13 15:17:44 +01:00
Ben Taylor
91b8310e54
Remove internal deprecated items
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-10-07 08:19:44 +01:00
Ben Taylor
7e8e438fce
Replace cases of time_t with mbedtls_time_t
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-09-29 14:24:47 +01:00