From 1f8036b05ebd7e69564deb33a42941c4d7cf5312 Mon Sep 17 00:00:00 2001 From: gabor-mezei-arm Date: Tue, 20 Apr 2021 12:08:36 +0200 Subject: [PATCH] Update PSA_ALG_IS_SIGN_MESSAGE Add missing algorithm for PSA_ALG_IS_SIGN_MESSAGE and update documentation. Signed-off-by: gabor-mezei-arm --- include/psa/crypto_values.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/psa/crypto_values.h b/include/psa/crypto_values.h index 5de21de9e..5febbb76e 100644 --- a/include/psa/crypto_values.h +++ b/include/psa/crypto_values.h @@ -1494,15 +1494,13 @@ * \param alg An algorithm identifier (value of type #psa_algorithm_t). * * \return 1 if alg is a signature algorithm that can be used to sign a - * message. 0 if alg is a signature algorithm that can only be used - * to sign an already-calculated hash. 0 if alg is not a signature - * algorithm. This macro can return either 0 or 1 if alg is not a + * message. 0 if \p alg is a signature algorithm that can only be used + * to sign an already-calculated hash. 0 if \p alg is not a signature + * algorithm. This macro can return either 0 or 1 if \p alg is not a * supported algorithm identifier. */ #define PSA_ALG_IS_SIGN_MESSAGE(alg) \ - (PSA_ALG_IS_RSA_PSS(alg) || PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg) || \ - PSA_ALG_IS_ECDSA(alg) || PSA_ALG_IS_HASH_EDDSA(alg) || \ - PSA_ALG_IS_VENDOR_HASH_AND_SIGN(alg)) + (PSA_ALG_IS_HASH_AND_SIGN(alg) || (alg) == PSA_ALG_PURE_EDDSA ) /** Get the hash used by a hash-and-sign signature algorithm. *