[dpdk-dev] [PATCH v5 1/3] crypto/openssl: add rsa and mod asym op

Verma, Shally Shally.Verma at cavium.com
Thu Nov 15 09:33:58 CET 2018



>-----Original Message-----
>From: Mcnamara, John <john.mcnamara at intel.com>
>Sent: 14 November 2018 20:35
>To: Sahu, Sunila <Sunila.Sahu at cavium.com>
>Cc: dev at dpdk.org; Athreya, Narayana Prasad <NarayanaPrasad.Athreya at cavium.com>; Murthy, Nidadavolu
><Nidadavolu.Murthy at cavium.com>; Gupta, Ashish <Ashish.Gupta at cavium.com>; De Lara Guarch, Pablo
><pablo.de.lara.guarch at intel.com>; Verma, Shally <Shally.Verma at cavium.com>
>Subject: RE: [dpdk-dev] [PATCH v5 1/3] crypto/openssl: add rsa and mod asym op
>
>External Email
>
>> +err_rsa:
>> +             if (n)
>> +                     BN_free(n);
>> +             if (e)
>> +                     BN_free(e);
>> +             if (d)
>> +                     BN_free(d);
>> +             if (p)
>> +                     BN_free(p);
>> +             if (q)
>> +                     BN_free(q);
>> +             if (dmp1)
>> +                     BN_free(dmp1);
>> +             if (dmq1)
>> +                     BN_free(dmq1);
>> +             if (iqmp)
>> +                     BN_free(iqmp);
>> +
>
>Hi,
>
>I don't think the if() test is required prior to calling BN_free().
>
>The docs say: "If a is NULL, nothing is done.":
>
>    https://www.openssl.org/docs/manmaster/man3/BN_free.html
Ok. will see and get back to you. Would like to test with different openssl versions, if all follow same rule no issues.

Thanks
Shally
>
>I mention this because the code above is also in Coverity defect 305854.
>
>Could you look at that and provide a fix.
>
>Thanks.
>
>John
>
>



More information about the dev mailing list