From 2b67d9471e502fef46522de7d1a3d551201d1670 Mon Sep 17 00:00:00 2001 From: quyawei Date: Wed, 21 Sep 2022 10:25:31 +0800 Subject: [PATCH] fix size_t cast in HMAC Signed-off-by: quyawei --- .../openssl_plugin/crypto_operation/hmac/src/mac_openssl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugin/openssl_plugin/crypto_operation/hmac/src/mac_openssl.c b/plugin/openssl_plugin/crypto_operation/hmac/src/mac_openssl.c index ce187c4..00abbbf 100644 --- a/plugin/openssl_plugin/crypto_operation/hmac/src/mac_openssl.c +++ b/plugin/openssl_plugin/crypto_operation/hmac/src/mac_openssl.c @@ -141,12 +141,7 @@ static uint32_t OpensslEngineGetMacLength(HcfMacSpi *self) LOGE("The CTX is NULL!"); return HCF_ERR_CRYPTO_OPERATION; } - int32_t size = HMAC_size(OpensslGetMacCtx(self)); - if (size < 0) { - LOGE("Get the overflow path length in openssl!"); - return 0; - } - return size; + return HMAC_size(OpensslGetMacCtx(self)); } static void OpensslDestroyMac(HcfObjectBase *self) -- Gitee