mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(supplicant): resolve constant expression warning in crypto_ecdh_output_size
Use PSA_BITS_TO_BYTES(key_bits) directly instead of PSA_RAW_KEY_AGREEMENT_OUTPUT_SIZE(PSA_KEY_TYPE_ECC_KEY_PAIR(...)) to eliminate a tautological type check that always evaluates to the same result.
This commit is contained in:
@@ -1624,8 +1624,7 @@ static size_t crypto_ecdh_output_size(const crypto_ec_key_wrapper_t *wrapper)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return PSA_RAW_KEY_AGREEMENT_OUTPUT_SIZE(
|
||||
PSA_KEY_TYPE_ECC_KEY_PAIR(ecc_family), key_bits);
|
||||
return PSA_BITS_TO_BYTES(key_bits);
|
||||
}
|
||||
|
||||
struct crypto_ec_key * crypto_ec_key_set_pub(const struct crypto_ec_group *group,
|
||||
|
||||
Reference in New Issue
Block a user