From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BB03C3A5A6 for ; Thu, 19 Sep 2019 11:54:23 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id CC66121924 for ; Thu, 19 Sep 2019 11:54:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="YXo8TP/V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC66121924 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=marvell.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1CC291EF67; Thu, 19 Sep 2019 13:54:10 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id DC6111EF56; Thu, 19 Sep 2019 13:54:06 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8JBpUPS003353; Thu, 19 Sep 2019 04:54:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=ycUluWlwKS24CGptV4H8quED7fhIh7qPsTlpJjv59Ko=; b=YXo8TP/V+bS71o5cpkzDl/JOOccspRJZpC6N0G5IhiQFWKVPQDoChfzXt+eib0CsQ+oR klDWrpf+z/xqueQnIsUuz5Biz6pDAtBmHANZ17C3FbLRMYMh2VjD00e3dB69e6nKOT7W g7yTZdmUGrx4zj6jhEwqxoiLvv6EZgVykJ3nPgY+HnTfughQlDAaT2R5Z2GLKixY5RPo c6AYHMAee6tcQf+AwLXc4nAdOdGlf22/U6Lxnp0Ar/aOiUZwM8A9SbMLu06TgzIf9Cx3 qAX3q2bscQgQYwQmYki8Sk7ZryxMM/Pt4NpBDDRKwz2w6cYPrrpPOdWyppCDgOFqFKk5 Aw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2v3vcdtr3s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 19 Sep 2019 04:54:05 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 19 Sep 2019 04:54:04 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 19 Sep 2019 04:54:04 -0700 Received: from vvenus375.il.marvell.com (unknown [10.5.120.75]) by maili.marvell.com (Postfix) with ESMTP id A58683F7043; Thu, 19 Sep 2019 04:54:02 -0700 (PDT) From: To: CC: , , , , Date: Thu, 19 Sep 2019 15:12:25 +0300 Message-ID: <20190919121232.4864-2-michaelsh@marvell.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919121232.4864-1-michaelsh@marvell.com> References: <20190919121232.4864-1-michaelsh@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-19_04:2019-09-18,2019-09-19 signatures=0 Subject: [dpdk-dev] [PATCH 1/8] examples/fips_validation: separation between HMAC-SHA and SHA X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Michael Shamis Fix: SHA initialization will not be called in case of HAMC-SHA Signed-off-by: Michael Shamis --- examples/fips_validation/fips_validation.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c index 8d43b267e..80fd482a1 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -145,11 +145,13 @@ fips_test_parse_header(void) if (ret < 0) return 0; } else if (strstr(info.vec[i], "SHA-")) { - algo_parsed = 1; - info.algo = FIPS_TEST_ALGO_SHA; - ret = parse_test_sha_init(); - if (ret < 0) - return ret; + if (info.algo != FIPS_TEST_ALGO_HMAC) { + algo_parsed = 1; + info.algo = FIPS_TEST_ALGO_SHA; + ret = parse_test_sha_init(); + if (ret < 0) + return ret; + } } } -- 2.23.0