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

2018-01-17 Thread Emmanuel Deloget
Hello, On Wed, Jan 17, 2018 at 1:16 PM, Steffan Karger wrote: > Hi, > > On 15 January 2018 at 23:33, Emmanuel Deloget wrote: > > For the variables outside the ifs, the next C standard should allow us to > > write something like: > > > > if ((RSA *rsa =

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

2018-01-17 Thread Steffan Karger
Hi, On 15 January 2018 at 23:33, Emmanuel Deloget wrote: > For the variables outside the ifs, the next C standard should allow us to > write something like: > > if ((RSA *rsa = EVP_PKEY_get0_RSA(pkey)) != NULL) { Yeah, such a shame that this didn't make it into C11. Scoping a

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

2018-01-15 Thread Selva Nair
Hi, On Mon, Jan 15, 2018 at 7:56 PM, Emmanuel Deloget wrote: > Hello Selva, > > On Tue, Jan 16, 2018 at 12:10 AM, Selva Nair wrote: > >> >> >> Can I try one last time to convince you guys to keep EVP_PKEY_id()? If I >> was targeting only 1.1.0+ that's how

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

2018-01-15 Thread Emmanuel Deloget
Hello Selva, On Tue, Jan 16, 2018 at 12:10 AM, Selva Nair wrote: > > > On Mon, Jan 15, 2018 at 5:33 PM, Emmanuel Deloget wrote: > >> Hello Steffan, >> >> On Sun, Jan 14, 2018 at 11:26 AM, Steffan Karger >> wrote: >> >>> Hi, >>> >>> On

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

2018-01-15 Thread Selva Nair
On Mon, Jan 15, 2018 at 5:33 PM, Emmanuel Deloget wrote: > Hello Steffan, > > On Sun, Jan 14, 2018 at 11:26 AM, Steffan Karger > wrote: > >> Hi, >> >> On 12-01-18 22:37, Emmanuel Deloget wrote: >> > Calling EVP_KEY_id() before EVP_PKEY_get0_*() is unnecessary

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

2018-01-15 Thread Emmanuel Deloget
Hello Steffan, On Sun, Jan 14, 2018 at 11:26 AM, Steffan Karger wrote: > Hi, > > On 12-01-18 22:37, Emmanuel Deloget wrote: > > 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

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

2018-01-14 Thread Steffan Karger
Hi, On 12-01-18 22:37, Emmanuel Deloget wrote: > 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

[Openvpn-devel] [PATCH v2 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