From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F3FC1A0613 for ; Mon, 26 Aug 2019 11:24:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1BA4B1BFE4; Mon, 26 Aug 2019 11:24:12 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 8F97D1BFA6 for ; Mon, 26 Aug 2019 11:24:07 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7Q9JZUK020150; Mon, 26 Aug 2019 02:24:07 -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=JnRdutM2CsibnosnocFEllXhBwMKAErjZ3IJncADEEY=; b=CYCFeXhmPaaj4zuYX4aqe3UQj5ybgJW58cEOpoCvDSyhwAw4guoNVjjdxlnB2Kli1ou5 yGK3Um6uV3LZBjhKOvg44dNxQ+TBP5P6xnKq9NANoHXoNjnqcR5Mk+KmO8J5jYqR0aNP TQ3dyqpb9CxU4X8Mvah0zrOJV89qrkmeZwSgIbQkleKLogC7hU2qT5kYiWqzzc3aBcEz oeXP2wWC/TECUQ20kqO4n1ikHtyxr/TTSagK+1UHE99kHN+qA4dwbo5p2vWnbltWpL9j D95av4+gTO7TyCngVRS6AZwhwIaSa+BPnsyhfFdyqzYh+LqDvbwkkVPv4UTPsMSVKKQ6 mw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2uk4rke1j5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 26 Aug 2019 02:24:06 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 26 Aug 2019 02:24:05 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 26 Aug 2019 02:24:05 -0700 Received: from vvenus375.il.marvell.com (unknown [10.5.120.75]) by maili.marvell.com (Postfix) with ESMTP id 340DD3F7041; Mon, 26 Aug 2019 02:24:03 -0700 (PDT) From: To: CC: , , Date: Mon, 26 Aug 2019 12:41:17 +0300 Message-ID: <20190826094120.22590-10-michaelsh@marvell.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190826094120.22590-1-michaelsh@marvell.com> References: <20190826094120.22590-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:5.22.84,1.0.8 definitions=2019-08-26_06:2019-08-23,2019-08-26 signatures=0 Subject: [dpdk-dev] [PATCH 09/12] examples/fips: fix KEY and PT output prints for TDES mode 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 Signed-off-by: Michael Shamis --- examples/fips_validation/fips_validation.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c index 91e6d48e7..ba513672e 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -11,6 +11,10 @@ #include "fips_validation.h" +#define COUNT0_STR "COUNT = 0 " +#define KEY_STR "KEY" +#define NK_STR "NumKey" + #define skip_white_spaces(pos) \ ({ \ __typeof__(pos) _p = (pos); \ @@ -68,6 +72,22 @@ fips_test_fetch_one_block(void) if (size == 0) break; + /* if first line is KEY-line then insert COUNT-line */ + if (i == 0) { + if (strstr(info.one_line_text, KEY_STR)) { + info.vec[0] = calloc(1, sizeof(COUNT0_STR)); + strlcpy(info.vec[0], + COUNT0_STR, + sizeof(COUNT0_STR)); + i = 1; + info.nb_vec_lines = 1; + } + } + + /* don't copy NumKey-line */ + if (strstr(info.one_line_text, NK_STR)) + break; + info.vec[i] = calloc(1, size + 5); if (info.vec[i] == NULL) goto error_exit; -- 2.23.0