From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 972731B8B7 for ; Fri, 8 Feb 2019 12:13:49 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2019 03:13:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,347,1544515200"; d="scan'208";a="141749572" Received: from akusztax-mobl.ger.corp.intel.com ([10.104.14.178]) by fmsmga002.fm.intel.com with ESMTP; 08 Feb 2019 03:13:45 -0800 From: Arek Kusztal To: dev@dpdk.org Cc: akhil.goyal@nxp.com, fiona.trahe@intel.com, shally.verma@caviumnetworks.com, Arek Kusztal Date: Fri, 8 Feb 2019 12:13:37 +0100 Message-Id: <20190208111338.4544-3-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.19.1.windows.1 In-Reply-To: <20190208111338.4544-1-arkadiuszx.kusztal@intel.com> References: <20190208111338.4544-1-arkadiuszx.kusztal@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/3] openssl: add result field to mod exp and mod inv operations 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: , X-List-Received-Date: Fri, 08 Feb 2019 11:13:50 -0000 This patch adds result field to modular exponentiation and modular multiplicative inverse operations in openssl pmd functions Signed-off-by: Arek Kusztal --- drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 0230050..5096ca1 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -1790,7 +1790,7 @@ process_openssl_modinv_op(struct rte_crypto_op *cop, if (BN_mod_inverse(res, base, sess->u.m.modulus, sess->u.m.ctx)) { cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS; - op->modinv.base.length = BN_bn2bin(res, op->modinv.base.data); + op->modinv.result.length = BN_bn2bin(res, op->modinv.result.data); } else { cop->status = RTE_CRYPTO_OP_STATUS_ERROR; } @@ -1819,7 +1819,7 @@ process_openssl_modexp_op(struct rte_crypto_op *cop, if (BN_mod_exp(res, base, sess->u.e.exp, sess->u.e.mod, sess->u.e.ctx)) { - op->modex.base.length = BN_bn2bin(res, op->modex.base.data); + op->modex.result.length = BN_bn2bin(res, op->modex.result.data); cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS; } else { cop->status = RTE_CRYPTO_OP_STATUS_ERROR; -- 2.1.0