Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-17 Thread Lukas Tribus
On Tue, 17 Dec 2019 at 21:18, Rosen Penev wrote: > > That's why I'm suggesting: > > > > #ifndef X509_getm_notBefore > > #define X509_getm_notBefore X509_get_notBefore > > #define X509_getm_notAfter X509_get_notAfter > > #endif > > > > > > Am I missing something? > Yes you are. A macro is

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-17 Thread Rosen Penev
On Tue, Dec 17, 2019 at 11:34 AM Lukas Tribus wrote: > > Hello, > > On Mon, 16 Dec 2019 at 20:53, Rosen Penev wrote: > > > Any reason why would not just #ifndef X509_getm_notBefore, testing for > > > what we actually want instead of those backbreaking version > > > assumptions? > >

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-17 Thread Lukas Tribus
Hello, On Mon, 16 Dec 2019 at 20:53, Rosen Penev wrote: > > Any reason why would not just #ifndef X509_getm_notBefore, testing for > > what we actually want instead of those backbreaking version > > assumptions? > X509_getm_notBefore is a function, not a define. A function which needs to be

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Илья Шипицин
вт, 17 дек. 2019 г. в 00:55, Rosen Penev : > On Mon, Dec 16, 2019 at 10:21 AM Илья Шипицин > wrote: > > > > > > > > пн, 16 дек. 2019 г. в 22:40, Rosen Penev : > >> > >> On Mon, Dec 16, 2019 at 4:49 AM Lukas Tribus wrote: > >> > > >> > Hello Rosen, > >> > > >> > > пн, 16 дек. 2019 г. в 12:07,

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Rosen Penev
On Mon, Dec 16, 2019 at 10:21 AM Илья Шипицин wrote: > > > > пн, 16 дек. 2019 г. в 22:40, Rosen Penev : >> >> On Mon, Dec 16, 2019 at 4:49 AM Lukas Tribus wrote: >> > >> > Hello Rosen, >> > >> > > пн, 16 дек. 2019 г. в 12:07, Rosen Penev : >> > >> >> > >> LIBRESSL_VERSION_NUMBER evaluates to 0

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Rosen Penev
On Mon, Dec 16, 2019 at 10:09 AM Lukas Tribus wrote: > > On Mon, 16 Dec 2019 at 19:00, Илья Шипицин wrote: > > > > > > > > пн, 16 дек. 2019 г. в 22:42, Rosen Penev : > >> > >> LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition > >> always true. Check for the define before

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Илья Шипицин
пн, 16 дек. 2019 г. в 22:40, Rosen Penev : > On Mon, Dec 16, 2019 at 4:49 AM Lukas Tribus wrote: > > > > Hello Rosen, > > > > > пн, 16 дек. 2019 г. в 12:07, Rosen Penev : > > >> > > >> LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the > condition > > >> always true. Check for the

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Lukas Tribus
On Mon, 16 Dec 2019 at 19:00, Илья Шипицин wrote: > > > > пн, 16 дек. 2019 г. в 22:42, Rosen Penev : >> >> LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition >> always true. Check for the define before checking it. >> >> Signed-off-by: Rosen Penev >> --- >>

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Rosen Penev
On Mon, Dec 16, 2019 at 10:00 AM Илья Шипицин wrote: > > > > пн, 16 дек. 2019 г. в 22:42, Rosen Penev : >> >> LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition >> always true. Check for the define before checking it. >> >> Signed-off-by: Rosen Penev >> --- >>

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Илья Шипицин
пн, 16 дек. 2019 г. в 22:42, Rosen Penev : > LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition > always true. Check for the define before checking it. > > Signed-off-by: Rosen Penev > --- > include/common/openssl-compat.h | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Rosen Penev
On Mon, Dec 16, 2019 at 4:49 AM Lukas Tribus wrote: > > Hello Rosen, > > > пн, 16 дек. 2019 г. в 12:07, Rosen Penev : > >> > >> LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition > >> always true. Check for the define before checking it. > > I cannot find this in the

[PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Rosen Penev
LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition always true. Check for the define before checking it. Signed-off-by: Rosen Penev --- include/common/openssl-compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/openssl-compat.h

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Lukas Tribus
Hello Rosen, > пн, 16 дек. 2019 г. в 12:07, Rosen Penev : >> >> LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition >> always true. Check for the define before checking it. I cannot find this in the openssl sources, not in master and not in the 1.1.1 branch. Please clarify

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Илья Шипицин
also, BoringSSL fails after applying your patch https://travis-ci.com/chipitsine/haproxy/jobs/267601286 пн, 16 дек. 2019 г. в 12:07, Rosen Penev : > LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition > always true. Check for the define before checking it. > >

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-16 Thread Илья Шипицин
пн, 16 дек. 2019 г. в 12:47, William Lallemand : > Hello Rosen, > > On Sun, Dec 15, 2019 at 11:04:37PM -0800, Rosen Penev wrote: > > -#if (OPENSSL_VERSION_NUMBER < 0x1010L) || (LIBRESSL_VERSION_NUMBER > < 0x2070L) > > +#if (OPENSSL_VERSION_NUMBER < 0x1010L) || \ > > +

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-15 Thread William Lallemand
Hello Rosen, On Sun, Dec 15, 2019 at 11:04:37PM -0800, Rosen Penev wrote: > -#if (OPENSSL_VERSION_NUMBER < 0x1010L) || (LIBRESSL_VERSION_NUMBER < > 0x2070L) > +#if (OPENSSL_VERSION_NUMBER < 0x1010L) || \ > + (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < >

Re: [PATCH] openssl-compat: Fix getm_ defines

2019-12-15 Thread Илья Шипицин
hello, seems OpenWRT guys here :-) please have a look at https://github.com/haproxy/haproxy/issues/367 (it still misses germ part, I tried things like you send, but reg-tests fail. do you have travis-ci passed ?) also, there's a patch already sent, Lukas Tribus promised to review it пн, 16 дек.

[PATCH] openssl-compat: Fix getm_ defines

2019-12-15 Thread Rosen Penev
LIBRESSL_VERSION_NUMBER evaluates to 0 under OpenSSL, making the condition always true. Check for the define before checking it. Signed-off-by: Rosen Penev --- include/common/openssl-compat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/common/openssl-compat.h