Skip site navigation (1) Skip section navigation (2)

Re: BUG #4869: No proper initialization of OpenSSL-Engine in libpq

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Lars Kanis <kanis(at)comcard(dot)de>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #4869: No proper initialization of OpenSSL-Engine in libpq
Date: 2009-06-22 16:21:28
Message-ID: 38160391-9D20-4650-9A15-756B21ABEE9B@hagander.net (view raw or flat)
Thread:
Lists: pgsql-bugs
On 22 jun 2009, at 18.05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> How about the attached patch? Does it work for you?
>
> The existing references to typedef ENGINE and associated functions are
> wrapped in
>
> #if (SSLEAY_VERSION_NUMBER >= 0x00907000L) && !defined 
> (OPENSSL_NO_ENGINE)
>
> I rather imagine that this patch will cause complete failure in builds
> where that's not true.

Yeah, that will have to be fixed.



>  I'm also a bit concerned about wrapping a struct
> field inside such an #if, as that's likely to cause hard-to-debug
> problems if two compilations read libpq-int.h with different #define
> environments.
>
Since it's a pointer we could just declare it as void, no? Or even #if  
between void and "real" pointer. Wouldn't that be safe?

(we already have a similar issue with the whole #ifdef use_ssl, don't  
we? But having one isn't an excuse to create another of courseā€¦)

/Magnus


In response to

Responses

pgsql-bugs by date

Next:From: Magnus HaganderDate: 2009-06-22 16:24:40
Subject: Re: BUG #4869: No proper initialization of OpenSSL-Engine in libpq
Previous:From: Tom LaneDate: 2009-06-22 16:05:12
Subject: Re: BUG #4869: No proper initialization of OpenSSL-Engine in libpq

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group