From 27323f538597965add7ae1bef95abd7bf0a655a8 Mon Sep 17 00:00:00 2001 From: Arek Kusztal Date: Tue, 5 Feb 2019 10:13:19 +0100 Subject: [PATCH] crypto/openssl: fix modexp Fixes bad reference of modinv struct in openssl pmd Fixes: 3e9d6bd447fb ("crypto/openssl: add RSA and mod asym operations") Cc: stable@dpdk.org Signed-off-by: Arek Kusztal Acked-by: Fiona Trahe Acked-by: Shally Verma Acked-by: Akhil Goyal --- drivers/crypto/openssl/rte_openssl_pmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 4ecc3c4148..51cdd9b965 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -1817,12 +1817,12 @@ process_openssl_modexp_op(struct rte_crypto_op *cop, return -1; } - base = BN_bin2bn((const unsigned char *)op->modinv.base.data, - op->modinv.base.length, base); + base = BN_bin2bn((const unsigned char *)op->modex.base.data, + op->modex.base.length, base); if (BN_mod_exp(res, base, sess->u.e.exp, sess->u.e.mod, sess->u.e.ctx)) { - op->modinv.base.length = BN_bn2bin(res, op->modinv.base.data); + op->modex.base.length = BN_bn2bin(res, op->modex.base.data); cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS; } else { cop->status = RTE_CRYPTO_OP_STATUS_ERROR; -- 2.20.1