Re-Add ECC verification code which was not properly merged in re-base.

This commit is contained in:
Nir Sonnenschein 2018-06-04 16:42:18 +03:00 committed by itayzafrir
parent 4db79eb36b
commit c460291714

View file

@ -1394,8 +1394,12 @@ psa_status_t psa_asymmetric_verify(psa_key_slot_t key,
#if defined(MBEDTLS_ECP_C) #if defined(MBEDTLS_ECP_C)
if( PSA_KEY_TYPE_IS_ECC( slot->type ) ) if( PSA_KEY_TYPE_IS_ECC( slot->type ) )
{ {
// TODO mbedtls_ecp_keypair *ecdsa = slot->data.ecp;
return( PSA_ERROR_NOT_SUPPORTED ); int ret;
(void)alg;
ret = mbedtls_ecdsa_read_signature(ecdsa, hash, hash_length, signature,
signature_size);
return(mbedtls_to_psa_error(ret));
} }
else else
#endif /* defined(MBEDTLS_ECP_C) */ #endif /* defined(MBEDTLS_ECP_C) */