Add test for incorrect key type in iop agreement

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott
2024-12-12 11:53:34 +00:00
parent 563788e577
commit dc256d0934
+5
View File
@@ -811,6 +811,11 @@ psa_status_t mbedtls_test_psa_raw_key_agreement_with_self(
PSA_ASSERT(status);
}
} else {
TEST_EQUAL(psa_key_agreement_iop_setup(&iop_operation, key, public_key,
public_key_length, alg,
&shared_secret_attributes),
PSA_ERROR_INVALID_ARGUMENT);
}
#endif // defined(MBEDTLS_ECP_RESTARTABLE) && defined(MBEDTLS_PSA_BUILTIN_ALG_ECDH)