mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-30 07:20:59 +00:00
test_suite_pk: replace USE_PSA with CRYPTO_C in tests using mbedtls_pk_setup_opaque()
This commit also fix guards for mbedtls_pk_can_do_ext(). Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
0f8d695c25
commit
b15e54ec26
@ -447,7 +447,7 @@ static inline size_t mbedtls_pk_get_len(const mbedtls_pk_context *ctx)
|
||||
*/
|
||||
int mbedtls_pk_can_do(const mbedtls_pk_context *ctx, mbedtls_pk_type_t type);
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
||||
/**
|
||||
* \brief Tell if context can do the operation given by PSA algorithm
|
||||
*
|
||||
@ -477,7 +477,7 @@ int mbedtls_pk_can_do(const mbedtls_pk_context *ctx, mbedtls_pk_type_t type);
|
||||
*/
|
||||
int mbedtls_pk_can_do_ext(const mbedtls_pk_context *ctx, psa_algorithm_t alg,
|
||||
psa_key_usage_t usage);
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_C */
|
||||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
||||
/**
|
||||
|
@ -238,7 +238,7 @@ int mbedtls_pk_can_do(const mbedtls_pk_context *ctx, mbedtls_pk_type_t type)
|
||||
return ctx->pk_info->can_do(type);
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
||||
/*
|
||||
* Tell if a PK can do the operations of the given PSA algorithm
|
||||
*/
|
||||
@ -376,7 +376,7 @@ int mbedtls_pk_can_do_ext(const mbedtls_pk_context *ctx, psa_algorithm_t alg,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_C */
|
||||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
||||
#if defined(MBEDTLS_RSA_C)
|
||||
|
@ -332,7 +332,7 @@ exit:
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
||||
|
||||
/*
|
||||
* Generate an ECC key using PSA and return the key identifier of that key,
|
||||
@ -377,7 +377,7 @@ mbedtls_svc_key_id_t pk_psa_genkey_rsa(void)
|
||||
exit:
|
||||
return key;
|
||||
}
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_C */
|
||||
/* END_HEADER */
|
||||
|
||||
/* BEGIN_DEPENDENCIES
|
||||
@ -385,7 +385,7 @@ exit:
|
||||
* END_DEPENDENCIES
|
||||
*/
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_USE_PSA_CRYPTO */
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_PSA_CRYPTO_C */
|
||||
void pk_psa_utils(int key_is_rsa)
|
||||
{
|
||||
mbedtls_pk_context pk, pk2;
|
||||
@ -487,7 +487,7 @@ exit:
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_USE_PSA_CRYPTO */
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_PSA_CRYPTO_C */
|
||||
void pk_can_do_ext(int opaque_key, int key_type, int key_usage, int key_alg,
|
||||
int key_alg2, int curve_or_keybits, int alg_check, int usage_check,
|
||||
int result)
|
||||
|
Loading…
x
Reference in New Issue
Block a user