File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3969,9 +3969,13 @@ psa_status_t mbedtls_psa_sign_hash_start(
39693969 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED ;
39703970 size_t required_hash_length ;
39713971
3972- if (!PSA_KEY_TYPE_IS_ECC (attributes -> type )) {
3972+ if (!PSA_KEY_TYPE_IS_ECC_KEY_PAIR (attributes -> type )) {
39733973 return PSA_ERROR_NOT_SUPPORTED ;
39743974 }
3975+ psa_ecc_family_t curve = PSA_KEY_TYPE_ECC_GET_FAMILY (attributes -> type );
3976+ if (!PSA_ECC_FAMILY_IS_WEIERSTRASS (curve )) {
3977+ return PSA_ERROR_INVALID_ARGUMENT ;
3978+ }
39753979
39763980 if (!can_do_interruptible_sign_verify (alg )) {
39773981 return PSA_ERROR_NOT_SUPPORTED ;
@@ -4188,6 +4192,10 @@ psa_status_t mbedtls_psa_verify_hash_start(
41884192 if (!PSA_KEY_TYPE_IS_ECC (attributes -> type )) {
41894193 return PSA_ERROR_NOT_SUPPORTED ;
41904194 }
4195+ psa_ecc_family_t curve = PSA_KEY_TYPE_ECC_GET_FAMILY (attributes -> type );
4196+ if (!PSA_ECC_FAMILY_IS_WEIERSTRASS (curve )) {
4197+ return PSA_ERROR_INVALID_ARGUMENT ;
4198+ }
41914199
41924200 if (!can_do_interruptible_sign_verify (alg )) {
41934201 return PSA_ERROR_NOT_SUPPORTED ;
You can’t perform that action at this time.
0 commit comments