pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Only provide openssl_tls_init_hook if building with openssl
5+ messages / 5 participants
[nested] [flat]
* pgsql: Only provide openssl_tls_init_hook if building with openssl
@ 2020-04-17 20:00 Andrew Dunstan <andrew@dunslane.net>
2020-04-17 20:32 ` Re: pgsql: Only provide openssl_tls_init_hook if building with openssl Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Dunstan @ 2020-04-17 20:00 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Only provide openssl_tls_init_hook if building with openssl
This should have been protected by #ifdef USE_OPENSSL in commit
896fcdb230.
Per the real complaint this time from Daniel Gustafsson.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f342d7ad03e61a1cea0339cf0c5aea0d01c3b43e
Modified Files
--------------
src/include/libpq/libpq-be.h | 2 ++
1 file changed, 2 insertions(+)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Only provide openssl_tls_init_hook if building with openssl
2020-04-17 20:00 pgsql: Only provide openssl_tls_init_hook if building with openssl Andrew Dunstan <andrew@dunslane.net>
@ 2020-04-17 20:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-04-17 20:43 ` Re: pgsql: Only provide openssl_tls_init_hook if building with openssl Daniel Gustafsson <daniel@yesql.se>
2020-04-17 20:52 ` Re: pgsql: Only provide openssl_tls_init_hook if building with openssl Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
0 siblings, 2 replies; 5+ messages in thread
From: Tom Lane @ 2020-04-17 20:32 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-committers@lists.postgresql.org
Andrew Dunstan <andrew@dunslane.net> writes:
> Only provide openssl_tls_init_hook if building with openssl
One or the other of these patches broke building without --with-openssl:
fe-secure.c:435: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PQgetSSLKeyPassHook'
fe-secure.c:441: error: expected ')' before 'hook'
fe-secure.c:447: warning: no previous prototype for 'PQdefaultSSLKeyPassHook'
make[3]: *** [fe-secure.o] Error 1
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Only provide openssl_tls_init_hook if building with openssl
2020-04-17 20:00 pgsql: Only provide openssl_tls_init_hook if building with openssl Andrew Dunstan <andrew@dunslane.net>
2020-04-17 20:32 ` Re: pgsql: Only provide openssl_tls_init_hook if building with openssl Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-04-17 20:43 ` Daniel Gustafsson <daniel@yesql.se>
2020-04-18 12:44 ` Re: pgsql: Only provide openssl_tls_init_hook if building with openssl Michael Paquier <michael@paquier.xyz>
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Gustafsson @ 2020-04-17 20:43 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-committers@lists.postgresql.org
> On 17 Apr 2020, at 22:32, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Andrew Dunstan <andrew@dunslane.net> writes:
>> Only provide openssl_tls_init_hook if building with openssl
>
> One or the other of these patches broke building without --with-openssl:
>
> fe-secure.c:435: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PQgetSSLKeyPassHook'
> fe-secure.c:441: error: expected ')' before 'hook'
> fe-secure.c:447: warning: no previous prototype for 'PQdefaultSSLKeyPassHook'
> make[3]: *** [fe-secure.o] Error 1
fe-secure.c provides dummy implementations for non-SSL builds, and have a dummy
PQsslKeyPassHook_type implementation there. So either the dummy needs to be
removed if we want this hook OpenSSL specific as well, or the USE_OPENSSL
guards from 9e24109f1a4e4d8d1d keeping them only for openssl_tls_init_hook.
cheers ./daniel
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Only provide openssl_tls_init_hook if building with openssl
2020-04-17 20:00 pgsql: Only provide openssl_tls_init_hook if building with openssl Andrew Dunstan <andrew@dunslane.net>
2020-04-17 20:32 ` Re: pgsql: Only provide openssl_tls_init_hook if building with openssl Tom Lane <tgl@sss.pgh.pa.us>
2020-04-17 20:43 ` Re: pgsql: Only provide openssl_tls_init_hook if building with openssl Daniel Gustafsson <daniel@yesql.se>
@ 2020-04-18 12:44 ` Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 5+ messages in thread
From: Michael Paquier @ 2020-04-18 12:44 UTC (permalink / raw)
To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Andrew Dunstan <andrew@dunslane.net>; pgsql-committers@lists.postgresql.org
On Fri, Apr 17, 2020 at 10:43:11PM +0200, Daniel Gustafsson wrote:
> fe-secure.c provides dummy implementations for non-SSL builds, and have a dummy
> PQsslKeyPassHook_type implementation there. So either the dummy needs to be
> removed if we want this hook OpenSSL specific as well, or the USE_OPENSSL
> guards from 9e24109f1a4e4d8d1d keeping them only for openssl_tls_init_hook.
I was just looking at the git history and bumped into this thread. I
think Andrew got it right to revert 9e24109 with 6741cfa: these
routines should be declared and return dummy results for non-SSL
builds or applications are going to have a hard time maintaining
compatibility with libpq depending on what they link to if they get to
call those SSL new routines.
PS: Thanks for f342d7a.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Only provide openssl_tls_init_hook if building with openssl
2020-04-17 20:00 pgsql: Only provide openssl_tls_init_hook if building with openssl Andrew Dunstan <andrew@dunslane.net>
2020-04-17 20:32 ` Re: pgsql: Only provide openssl_tls_init_hook if building with openssl Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-04-17 20:52 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Dunstan @ 2020-04-17 20:52 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-committers@lists.postgresql.org
On 4/17/20 4:32 PM, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> Only provide openssl_tls_init_hook if building with openssl
> One or the other of these patches broke building without --with-openssl:
>
> fe-secure.c:435: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PQgetSSLKeyPassHook'
> fe-secure.c:441: error: expected ')' before 'hook'
> fe-secure.c:447: warning: no previous prototype for 'PQdefaultSSLKeyPassHook'
> make[3]: *** [fe-secure.o] Error 1
>
>
I am not batting 1000 today. Apologies to all.
Looks like the libpq change should be reverted. I'll double check.
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2020-04-18 12:44 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 20:00 pgsql: Only provide openssl_tls_init_hook if building with openssl Andrew Dunstan <andrew@dunslane.net>
2020-04-17 20:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-04-17 20:43 ` Daniel Gustafsson <daniel@yesql.se>
2020-04-18 12:44 ` Michael Paquier <michael@paquier.xyz>
2020-04-17 20:52 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox