diff --git a/include/psa/crypto.h b/include/psa/crypto.h index ba0755b2e..2477e58a5 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -929,6 +929,7 @@ typedef uint32_t psa_algorithm_t; #define PSA_ALG_SIGN_GET_HASH(alg) \ (PSA_ALG_IS_RSA_PSS(alg) || PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg) || \ PSA_ALG_IS_DSA(alg) || PSA_ALG_IS_ECDSA(alg) ? \ + ((alg) & PSA_ALG_HASH_MASK) == 0 ? /*"raw" algorithm*/ 0 : \ ((alg) & PSA_ALG_HASH_MASK) | PSA_ALG_CATEGORY_HASH : \ 0)