Re: [Openvpn-devel] [PATCH 2/3] OpenSSL: remove some EVP_PKEY type checks

2018-01-12 Thread Emmanuel Deloget
Hello Selva, On Fri, Jan 12, 2018 at 6:09 PM, Selva Nair wrote: > Hi, > > I will defer to crypto experts for a proper review, but a quick remark > > On Fri, Jan 12, 2018 at 11:48 AM, Emmanuel Deloget wrote: > > Calling EVP_KEY_id() before EVP_PKEY_get0_*()

Re: [Openvpn-devel] [PATCH 2/3] OpenSSL: remove some EVP_PKEY type checks

2018-01-12 Thread Selva Nair
Hi, I will defer to crypto experts for a proper review, but a quick remark On Fri, Jan 12, 2018 at 11:48 AM, Emmanuel Deloget wrote: > Calling EVP_KEY_id() before EVP_PKEY_get0_*() is unnecessary as > the same check is also performed in the later. > > ... > +RSA

[Openvpn-devel] [PATCH 2/3] OpenSSL: remove some EVP_PKEY type checks

2018-01-12 Thread Emmanuel Deloget
Calling EVP_KEY_id() before EVP_PKEY_get0_*() is unnecessary as the same check is also performed in the later. We also make the code a bit better by not calling the various EVP_PKEY_get0_*() functions twice (this needs a bit or reordering to avoid introducing yet another #ifndef OPENSSL_NO_EC in