mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-29 12:32:48 +00:00
Move TEST_AVAILABLE_ECC into ssl_helpers.h
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
parent
1db628f254
commit
09a6f7e14f
@ -539,6 +539,25 @@ int tweak_tls13_certificate_msg_vector_len(
|
||||
TEST_EQUAL(ret, exp_ret_val)
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
|
||||
#define TEST_AVAILABLE_ECC(tls_id_, group_id_, psa_family_, psa_bits_) \
|
||||
TEST_EQUAL(mbedtls_ssl_get_ecp_group_id_from_tls_id(tls_id_), \
|
||||
group_id_); \
|
||||
TEST_EQUAL(mbedtls_ssl_get_tls_id_from_ecp_group_id(group_id_), \
|
||||
tls_id_); \
|
||||
TEST_EQUAL(mbedtls_ssl_get_psa_curve_info_from_tls_id(tls_id_, \
|
||||
&psa_family, &psa_bits), PSA_SUCCESS); \
|
||||
TEST_EQUAL(psa_family_, psa_family); \
|
||||
TEST_EQUAL(psa_bits_, psa_bits);
|
||||
|
||||
#define TEST_UNAVAILABLE_ECC(tls_id_, group_id_, psa_family_, psa_bits_) \
|
||||
TEST_EQUAL(mbedtls_ssl_get_ecp_group_id_from_tls_id(tls_id_), \
|
||||
MBEDTLS_ECP_DP_NONE); \
|
||||
TEST_EQUAL(mbedtls_ssl_get_tls_id_from_ecp_group_id(group_id_), \
|
||||
0); \
|
||||
TEST_EQUAL(mbedtls_ssl_get_psa_curve_info_from_tls_id(tls_id_, \
|
||||
&psa_family, &psa_bits), \
|
||||
PSA_ERROR_NOT_SUPPORTED);
|
||||
|
||||
#endif /* MBEDTLS_SSL_TLS_C */
|
||||
|
||||
#endif /* SSL_HELPERS_H */
|
||||
|
@ -31,25 +31,6 @@ enum {
|
||||
#undef MBEDTLS_SSL_TLS1_3_LABEL
|
||||
};
|
||||
|
||||
#define TEST_AVAILABLE_ECC(tls_id_, group_id_, psa_family_, psa_bits_) \
|
||||
TEST_EQUAL(mbedtls_ssl_get_ecp_group_id_from_tls_id(tls_id_), \
|
||||
group_id_); \
|
||||
TEST_EQUAL(mbedtls_ssl_get_tls_id_from_ecp_group_id(group_id_), \
|
||||
tls_id_); \
|
||||
TEST_EQUAL(mbedtls_ssl_get_psa_curve_info_from_tls_id(tls_id_, \
|
||||
&psa_family, &psa_bits), PSA_SUCCESS); \
|
||||
TEST_EQUAL(psa_family_, psa_family); \
|
||||
TEST_EQUAL(psa_bits_, psa_bits);
|
||||
|
||||
#define TEST_UNAVAILABLE_ECC(tls_id_, group_id_, psa_family_, psa_bits_) \
|
||||
TEST_EQUAL(mbedtls_ssl_get_ecp_group_id_from_tls_id(tls_id_), \
|
||||
MBEDTLS_ECP_DP_NONE); \
|
||||
TEST_EQUAL(mbedtls_ssl_get_tls_id_from_ecp_group_id(group_id_), \
|
||||
0); \
|
||||
TEST_EQUAL(mbedtls_ssl_get_psa_curve_info_from_tls_id(tls_id_, \
|
||||
&psa_family, &psa_bits), \
|
||||
PSA_ERROR_NOT_SUPPORTED);
|
||||
|
||||
/* END_HEADER */
|
||||
|
||||
/* BEGIN_DEPENDENCIES
|
||||
|
Loading…
x
Reference in New Issue
Block a user