TEE_Result TEE_AsymmetricVerifyDigest(TEE_OperationHandle operation, TEE_Attribute *params, uint32_t paramCount, void *digest, uint32_t digestLen, void *signature, uint32_t signatureLen) { TEE_Result res; struct utee_attribute ua[paramCount]; if (operation == TEE_HANDLE_NULL || (digest == NULL && digestLen != 0) || (signature == NULL && signatureLen != 0)) TEE_Panic(0); if (params == NULL && paramCount != 0) TEE_Panic(0); if (!operation->key1) TEE_Panic(0); if (operation->info.operationClass != TEE_OPERATION_ASYMMETRIC_SIGNATURE) TEE_Panic(0); if (operation->info.mode != TEE_MODE_VERIFY) TEE_Panic(0); __utee_from_attr(ua, params, paramCount); res = utee_asymm_verify(operation->state, ua, paramCount, digest, digestLen, signature, signatureLen); if (res != TEE_SUCCESS && res != TEE_ERROR_SIGNATURE_INVALID) TEE_Panic(res); return res; }
TEE_Result TEE_AsymmetricVerifyDigest(TEE_OperationHandle op, const TEE_Attribute *params, uint32_t paramCount, const void *digest, size_t digestLen, const void *signature, size_t signatureLen) { TEE_Result res; if (op == TEE_HANDLE_NULL || (digest == NULL && digestLen != 0) || (signature == NULL && signatureLen != 0)) TEE_Panic(0); if (paramCount != 0 && params == NULL) TEE_Panic(0); if (op->info.operationClass != TEE_OPERATION_ASYMMETRIC_SIGNATURE) TEE_Panic(0); if (op->info.mode != TEE_MODE_VERIFY) TEE_Panic(0); res = utee_asymm_verify(op->state, params, paramCount, digest, digestLen, signature, signatureLen); if (res != TEE_SUCCESS && res != TEE_ERROR_SIGNATURE_INVALID) TEE_Panic(res); return res; }