Following recent removal for '_reference' and '_use_psa' functions we
ended up having 2 very similar test components named
'component_test_psa_crypto_config_accel_hash', one using 'default'
configuration and the other one using the 'full' one.
Let's keep the 'full' configuration version and get rid of the 'default'
case.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
'ssl-opt.sh' and 'compat.sh' in accel components were mostly useful back
when the accelerated components were to be compared against the reference
ones to ensure proper test coverage. Now that the reference components
have been removed it doesn't make sense to keep 'ssl-opt.sh' and
'compat.sh' around because they take a lot of simulation time for almost
no benefit. From TLS point of view we can rely on normal 'test_suite_'
testing to be sure that the crypto mechanism works as expected.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Nowadays USE_PSA_CRYPTO is always enabled and there is no way to disable
it. It doesn't give more information to know that we're setting that
build symbol. Remove that.
While at this remove also '_use_psa' from some test component still using
it in the name for the same reason.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
These were useful in the 3.6 days when 'analyze_outcomes.py' was used to
check that driver acceleration was providing the same coverage as the
reference legacy modules. Since this check has recently been removed
from 'analyze_outcomes.py' all the '_reference' component can be
removed as they are just wasting CI time.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
The intent on these lines was to get 'psa_key_type_t' for which
'mbedtls_pk_get_key_type' should clearly be used, not
'mbedtls_pk_get_type'.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
MBEDTLS_ECP_DP_MAX is defined in 'ecp.h' which is a tf-psa-crypto private
header. Instead of relying on that value define a new function named
'mbedtls_ssl_get_supported_tls_id_count' which returns the number of
entries in 'tls_id_match_table'.
Rationale: it does not have too much sense to allocate an array for TLS
IDs which is larger than the list of supported TLS IDs in the current
build.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Align to recent changes in TLS group ID related functions:
- 'mbedtls_ssl_get_ecp_group_id_from_tls_id' renamed to
'mbedtls_ssl_is_tls_id_supported'.
- 'mbedtls_ssl_get_tls_id_from_ecp_group_id' renamed to
'mbedtls_ssl_get_tls_id_from_ecp_group_id'.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Its main functionality was to get a TLS ID from 'mbedtls_ecp_group_id' and
then call 'mbedtls_ssl_check_curve_tls_id'. The same can be achieved
with public PK functions and 'mbedtls_ssl_get_tls_id_from_curve_info',
then calling into 'mbedtls_ssl_check_curve_tls_id' as before.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Instead of retrieving the TLS ID using 'mbedtls_ecp_group_id', which
creates a dependency on the (now tf-psa-crypto private) 'ecp.h' header,
use PSA info to get the same result. Therefore rename the function as
'mbedtls_ssl_get_tls_id_from_curve_info'.
This new function has basically the opposite behavior than
'mbedtls_ssl_get_psa_curve_info_from_tls_id'.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
All the usages of 'mbedtls_ssl_get_ecp_group_id_from_tls_id' basically
reduce to checking if a specific TLS ID is supported or not. Therefore
the function is replaced with 'mbedtls_ssl_is_tls_id_supported'.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
After crypto#827 some PK error codes changed from
MBEDTLS_ERR_PK_INVALID_PUBKEY to MBEDTLS_ERR_PK_INVALID_ALG.
This commit adjusts failing test cases.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>