Always take the zero length hash value for SM3 from the local constant
to avoid a reported build error when SM3 is configured to be a module.
Fixes:
0f2bc13181ce ("crypto: inside-secure - Added support for...")
Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
memcpy(areq->result, sha512_zero_message_hash,
SHA512_DIGEST_SIZE);
else if (ctx->alg == CONTEXT_CONTROL_CRYPTO_ALG_SM3) {
- if (IS_ENABLED(CONFIG_CRYPTO_SM3))
- memcpy(areq->result, sm3_zero_message_hash,
- SM3_DIGEST_SIZE);
- else
- memcpy(areq->result,
- EIP197_SM3_ZEROM_HASH, SM3_DIGEST_SIZE);
+ memcpy(areq->result,
+ EIP197_SM3_ZEROM_HASH, SM3_DIGEST_SIZE);
}
return 0;