]> git.droids-corp.org - dpdk.git/commitdiff
crypto/openssl: add result field to mod exp and inv
authorArek Kusztal <arkadiuszx.kusztal@intel.com>
Fri, 8 Feb 2019 11:13:37 +0000 (12:13 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Fri, 22 Mar 2019 13:27:46 +0000 (14:27 +0100)
This patch adds result field to modular exponentiation and modular
multiplicative inverse operations in openssl pmd functions

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
drivers/crypto/openssl/rte_openssl_pmd.c

index 51cdd9b965c71124ff31f7c2a2cd16513f5d56a8..93cd73ee5572d982d6a950fe3884a6baa13b3d78 100644 (file)
@@ -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;
        }
@@ -1822,7 +1822,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;