X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=drivers%2Fcrypto%2Fopenssl%2Frte_openssl_pmd.c;fp=drivers%2Fcrypto%2Fopenssl%2Frte_openssl_pmd.c;h=5b27bb91983c21df802775c183263c8985af7589;hb=ce2f72a24eaa89ff08fd64742c9425f17f42345c;hp=11ea0d1900381bc0cda3bd90b35a4c3a061966b4;hpb=5edab9b0e790c4e369c46998a9e56206a044297b;p=deb_dpdk.git diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 11ea0d19..5b27bb91 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -1799,6 +1799,9 @@ process_openssl_modinv_op(struct rte_crypto_op *cop, cop->status = RTE_CRYPTO_OP_STATUS_ERROR; } + BN_clear(res); + BN_clear(base); + return 0; } @@ -1820,17 +1823,20 @@ 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; } + BN_clear(res); + BN_clear(base); + return 0; }