Adapt guards for psa_is_dh_key_size_valid
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
33c91eb5d3
commit
28111dbf06
1 changed files with 6 additions and 0 deletions
|
@ -129,6 +129,9 @@ int psa_can_do_hash(psa_algorithm_t hash_alg)
|
|||
(void) hash_alg;
|
||||
return global_data.drivers_initialized;
|
||||
}
|
||||
#if defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_DH_KEY_PAIR) || \
|
||||
defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_DH_PUBLIC_KEY) || \
|
||||
defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR)
|
||||
static int psa_is_dh_key_size_valid(size_t bits)
|
||||
{
|
||||
if (bits != 2048 && bits != 3072 && bits != 4096 &&
|
||||
|
@ -138,6 +141,9 @@ static int psa_is_dh_key_size_valid(size_t bits)
|
|||
|
||||
return 1;
|
||||
}
|
||||
#endif /* MBEDTLS_PSA_BUILTIN_KEY_TYPE_DH_KEY_PAIR ||
|
||||
MBEDTLS_PSA_BUILTIN_KEY_TYPE_DH_PUBLIC_KEY ||
|
||||
PSA_WANT_KEY_TYPE_DH_KEY_PAIR */
|
||||
|
||||
psa_status_t mbedtls_to_psa_error(int ret)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue