From 54622aec806255443afbd99e57442b673d18bcb3 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 29 Jun 2018 22:24:24 +0200 Subject: [PATCH] Fix PSA_ALG_SIGN_GET_HASH for PSA_ALG_SIGN_xxx_RAW --- include/psa/crypto.h | 1 + 1 file changed, 1 insertion(+) 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)