From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 14962A0032; Mon, 11 Jul 2022 19:08:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4B3D40DF6; Mon, 11 Jul 2022 19:08:16 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 54E7A40C35 for ; Mon, 11 Jul 2022 19:08:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657559295; x=1689095295; h=from:to:cc:subject:date:message-id; bh=0wFYgQd0erJdcCgJvWCa6M5PtlyzdS2kesfOZsK77LA=; b=eQS27HE445ubqgHUWkUfOwLqVuOetpqMagtpMUz7CxseX7BQAYSEouMQ fuZM54HD9EOTMAGOBOT02UFY1qoNefSoMgUJ6M8FpIbsTqe1hCHvm6KPc lNtOV8EGMRY1Ku1hnNB+jzefZXATNqcnuWPEN9ZKN8MJ7mz868Pg3Offb xekyF/2UYtdM6+W87Mo8zi1eMiQb8UzFQPKNbtSLQNnhm4QcGpRs/f8+2 nZNff/RsoHk7zoIOJ9/Mi/cIFRLtj8ekkmS7yQgHmjNrAXBiC+Xh4VC8+ yNgDIBraHnFD4eU2YHmPMCzpK+nksY7hqgvCKoaeCcGJ4Y3108E3XqRX4 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10405"; a="284744440" X-IronPort-AV: E=Sophos;i="5.92,263,1650956400"; d="scan'208";a="284744440" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2022 10:08:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,263,1650956400"; d="scan'208";a="652541868" Received: from silpixa00400465.ir.intel.com ([10.55.128.22]) by fmsmga008.fm.intel.com with ESMTP; 11 Jul 2022 10:08:12 -0700 From: Kai Ji To: dev@dpdk.org Cc: gakhil@marvell.com, Kai Ji Subject: [dpdk-dev v1] crypto/openssl: fix of dstlen passed in HMAC Date: Tue, 12 Jul 2022 01:08:10 +0800 Message-Id: <20220711170810.60624-1-kai.ji@intel.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This fix of dstlen passed in OpenSSL 3.0 lib EVP MAC final routine. Fixes: 75adf1eae44f ("crypto/openssl: update HMAC routine with 3.0 EVP API") Signed-off-by: Kai Ji --- drivers/crypto/openssl/rte_openssl_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index e01dacc98d..5658b9db66 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -1395,7 +1395,7 @@ process_openssl_auth_hmac(struct rte_mbuf *mbuf_src, uint8_t *dst, int offset, } process_auth_final: - if (EVP_MAC_final(ctx, dst, &dstlen, sizeof(dst)) != 1) + if (EVP_MAC_final(ctx, dst, &dstlen, DIGEST_LENGTH_MAX) != 1) goto process_auth_err; EVP_MAC_CTX_free(ctx); -- 2.17.1