From 52885dd5dbb7702fd1a9bfbd34777d297291cd4b Mon Sep 17 00:00:00 2001 From: qingliutan Date: Wed, 27 Aug 2025 03:43:04 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E7=AC=A6=E5=8F=B7?= =?UTF-8?q?=E5=92=8C=E6=9C=89=E7=AC=A6=E5=8F=B7=E6=95=B4=E6=95=B0=E6=B7=B7?= =?UTF-8?q?=E7=94=A8=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qingliutan --- frameworks/cert_manager_standard/main/common/src/cm_pfx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frameworks/cert_manager_standard/main/common/src/cm_pfx.c b/frameworks/cert_manager_standard/main/common/src/cm_pfx.c index f0a1cef..9f82dda 100644 --- a/frameworks/cert_manager_standard/main/common/src/cm_pfx.c +++ b/frameworks/cert_manager_standard/main/common/src/cm_pfx.c @@ -200,8 +200,8 @@ static int32_t CmParseCertChain(const struct CmBlob *certChain, struct AppCert * break; } - int certCount = sk_X509_num(fullChain); - if (certCount == 0) { + int32_t certCount = sk_X509_num(fullChain); + if (certCount <= 0) { CM_LOG_E("cert chain has no cert"); ret = CMR_ERROR_OPENSSL_FAIL; break; @@ -214,7 +214,7 @@ static int32_t CmParseCertChain(const struct CmBlob *certChain, struct AppCert * } /* default certificate chain is packaged as a whole */ - appCert->certCount = certCount; + appCert->certCount = (uint32_t)certCount; appCert->certSize = certChain->size; *cert = sk_X509_value(fullChain, 0); // Increase the reference count to prevent it from being released -- Gitee