From f9d0c17eafb552d13b40a08b04aff61646196202 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 17 May 2021 22:31:15 +0200 Subject: [PATCH] Remove some remaining uses of deprecated constants Deprecated constants should only be used to test them specifically. Remove a few stragglers. Signed-off-by: Gilles Peskine --- docs/proposed/psa-driver-interface.md | 4 ++-- tests/suites/test_suite_psa_crypto_entropy.function | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/proposed/psa-driver-interface.md b/docs/proposed/psa-driver-interface.md index 2bdbff4e1..23274c74f 100644 --- a/docs/proposed/psa-driver-interface.md +++ b/docs/proposed/psa-driver-interface.md @@ -134,7 +134,7 @@ Example 2: the following capability declares that the driver can perform determ "entry_points": ["sign_hash"], "algorithms": ["PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256)", "PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_384)"], - "key_types": ["PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_CURVE_SECP_R1)"], + "key_types": ["PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)"], "key_sizes": [256, 384] } ``` @@ -164,7 +164,7 @@ The name `_` may be used instead of a curve or group to indicate that the capabi Valid examples: ``` PSA_KEY_TYPE_AES -PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_CURVE_SECP_R1) +PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1) PSA_KEY_TYPE_ECC_KEY_PAIR(_) ``` diff --git a/tests/suites/test_suite_psa_crypto_entropy.function b/tests/suites/test_suite_psa_crypto_entropy.function index 8c1fdab1a..4dcbb36a6 100644 --- a/tests/suites/test_suite_psa_crypto_entropy.function +++ b/tests/suites/test_suite_psa_crypto_entropy.function @@ -75,7 +75,7 @@ void external_rng_failure_sign( int key_type, data_t *key_data, int alg, psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; psa_set_key_type( &attributes, key_type ); - psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN ); + psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_SIGN_HASH ); psa_set_key_algorithm( &attributes, alg ); mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT; size_t input_size = input_size_arg;