Fix PSA_ALG_SIGN_GET_HASH for PSA_ALG_SIGN_xxx_RAW

This commit is contained in:
Gilles Peskine 2018-06-29 22:24:24 +02:00 committed by itayzafrir
parent 66763a008a
commit 54622aec80

View File

@ -929,6 +929,7 @@ typedef uint32_t psa_algorithm_t;
#define PSA_ALG_SIGN_GET_HASH(alg) \ #define PSA_ALG_SIGN_GET_HASH(alg) \
(PSA_ALG_IS_RSA_PSS(alg) || PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg) || \ (PSA_ALG_IS_RSA_PSS(alg) || PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg) || \
PSA_ALG_IS_DSA(alg) || PSA_ALG_IS_ECDSA(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 : \ ((alg) & PSA_ALG_HASH_MASK) | PSA_ALG_CATEGORY_HASH : \
0) 0)