1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-14 02:22:15 +03:00
Commit Graph

2 Commits

Author SHA1 Message Date
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
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