test_suite_psa_crypto: revert known failing checks for [en|de]cryption with opaque keys

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti 2024-01-15 15:05:24 +01:00
parent 62b6f10f64
commit 4860a6c7ac

View file

@ -2148,11 +2148,8 @@ void asymmetric_encryption_key_policy(int policy_usage_arg,
NULL, 0, NULL, 0,
buffer, buffer_length, buffer, buffer_length,
&output_length); &output_length);
if (use_opaque_key) { if (policy_alg == exercise_alg &&
/* Encryption/decryption is opaque keys is currently not supported. */ (policy_usage & PSA_KEY_USAGE_ENCRYPT) != 0) {
TEST_EQUAL(status, PSA_ERROR_NOT_SUPPORTED);
} else if (policy_alg == exercise_alg &&
(policy_usage & PSA_KEY_USAGE_ENCRYPT) != 0) {
PSA_ASSERT(status); PSA_ASSERT(status);
} else { } else {
TEST_EQUAL(status, PSA_ERROR_NOT_PERMITTED); TEST_EQUAL(status, PSA_ERROR_NOT_PERMITTED);
@ -2166,11 +2163,8 @@ void asymmetric_encryption_key_policy(int policy_usage_arg,
NULL, 0, NULL, 0,
buffer, buffer_length, buffer, buffer_length,
&output_length); &output_length);
if (use_opaque_key) { if (policy_alg == exercise_alg &&
/* Encryption/decryption is opaque keys is currently not supported. */ (policy_usage & PSA_KEY_USAGE_DECRYPT) != 0) {
TEST_EQUAL(status, PSA_ERROR_NOT_SUPPORTED);
} else if (policy_alg == exercise_alg &&
(policy_usage & PSA_KEY_USAGE_DECRYPT) != 0) {
TEST_EQUAL(status, PSA_ERROR_INVALID_PADDING); TEST_EQUAL(status, PSA_ERROR_INVALID_PADDING);
} else { } else {
TEST_EQUAL(status, PSA_ERROR_NOT_PERMITTED); TEST_EQUAL(status, PSA_ERROR_NOT_PERMITTED);