From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
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:28:06 |
Message-ID: | 19731.1245688086@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Magnus Hagander <magnus(at)hagander(dot)net> writes:
> On 22 jun 2009, at 18.05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 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?
Yeah, on reflection I think it'd be safe to do
#if (SSLEAY_VERSION_NUMBER >= 0x00907000L) && !defined(OPENSSL_NO_ENGINE)
ENGINE *ptr;
#else
/* dummy field to keep struct the same if OpenSSL version changes */
void *ptr;
#endif
(probably that #if should get wrapped up in an additional #define
instead of being duplicated in several places...)
> (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)
That's controlled by an entry in pg_config.h, though, and won't change
if someone happens to update their openssl install and then recompile
only parts of libpq.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Brendan Jurd | 2009-06-22 16:28:49 | Re: BUG #4862: different results in to_date() between 8.3.7 & 8.4.RC1 |
Previous Message | Magnus Hagander | 2009-06-22 16:24:40 | Re: BUG #4869: No proper initialization of OpenSSL-Engine in libpq |