pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Set libpq sslcompression to off by default
8+ messages / 4 participants
[nested] [flat]
* pgsql: Set libpq sslcompression to off by default
@ 2018-03-17 13:23 Peter Eisentraut <peter_e@gmx.net>
2018-03-17 16:47 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Eisentraut @ 2018-03-17 13:23 UTC (permalink / raw)
To: pgsql-committers
Set libpq sslcompression to off by default
Since SSL compression is no longer recommended, turn the default in
libpq from on to off.
OpenSSL 1.1.0 and many distribution packages already turn compression
off by default, so such a server won't accept compression anyway. So
this will mainly affect users of older OpenSSL installations.
Also update the documentation to make clear that this setting is no
longer recommended.
Discussion: https://www.postgresql.org/message-id/flat/595cf3b1-4ffe-7f05-6f72-f72b7afa7993%402ndquadrant.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e3bdb2d92600ed45bd46aaf48309a436a9628218
Modified Files
--------------
doc/src/sgml/libpq.sgml | 31 ++++++++++++++++++++-----------
src/interfaces/libpq/fe-connect.c | 2 +-
src/interfaces/libpq/fe-secure-openssl.c | 8 ++++----
3 files changed, 25 insertions(+), 16 deletions(-)
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Set libpq sslcompression to off by default
2018-03-17 13:23 pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter_e@gmx.net>
@ 2018-03-17 16:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-03-17 19:12 ` Re: pgsql: Set libpq sslcompression to off by default Daniel Gustafsson <daniel@yesql.se>
0 siblings, 1 reply; 8+ messages in thread
From: Tom Lane @ 2018-03-17 16:47 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-committers
Peter Eisentraut <peter_e@gmx.net> writes:
> Set libpq sslcompression to off by default
Buildfarm reports that SSL_clear_options isn't available everywhere.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Set libpq sslcompression to off by default
2018-03-17 13:23 pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter_e@gmx.net>
2018-03-17 16:47 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-03-17 19:12 ` Daniel Gustafsson <daniel@yesql.se>
2018-03-20 00:14 ` Re: pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Gustafsson @ 2018-03-17 19:12 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter_e@gmx.net>; pgsql-committers
> On 17 Mar 2018, at 17:47, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Peter Eisentraut <peter_e@gmx.net> writes:
>> Set libpq sslcompression to off by default
>
> Buildfarm reports that SSL_clear_options isn't available everywhere.
Per some reading of the documentation and various patchers it seems
SSL_clear_options() was introduced in 0.9.8m and SSL_OP_NO_COMPRESSION in
1.0.0. For older versions, the recommended option is to clear the list of
compression methods in order to disable compression:
#ifndef SSL_OP_NO_COMPRESSION
STACK_OF(SSL_COMP)* comp_methods;
comp_methods = SSL_COMP_get_compression_methods();
sk_SSL_COMP_zero(comp_methods);
#endif
I don’t have an old version handy to try on, so the above is untested.
cheers ./daniel
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Set libpq sslcompression to off by default
2018-03-17 13:23 pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter_e@gmx.net>
2018-03-17 16:47 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
2018-03-17 19:12 ` Re: pgsql: Set libpq sslcompression to off by default Daniel Gustafsson <daniel@yesql.se>
@ 2018-03-20 00:14 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-03-20 04:15 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Eisentraut @ 2018-03-20 00:14 UTC (permalink / raw)
To: Daniel Gustafsson <daniel@yesql.se>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers
On 3/17/18 15:12, Daniel Gustafsson wrote:
>> On 17 Mar 2018, at 17:47, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>
>> Peter Eisentraut <peter_e@gmx.net> writes:
>>> Set libpq sslcompression to off by default
>>
>> Buildfarm reports that SSL_clear_options isn't available everywhere.
>
> Per some reading of the documentation and various patchers it seems
> SSL_clear_options() was introduced in 0.9.8m and SSL_OP_NO_COMPRESSION in
> 1.0.0.
It seems the failure is limited to an old NetBSD version. They might
have patched their libssl locally somehow. Is it worth supporting this?
We could add a configure test for SSL_clear_options().
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Set libpq sslcompression to off by default
2018-03-17 13:23 pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter_e@gmx.net>
2018-03-17 16:47 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
2018-03-17 19:12 ` Re: pgsql: Set libpq sslcompression to off by default Daniel Gustafsson <daniel@yesql.se>
2018-03-20 00:14 ` Re: pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2018-03-20 04:15 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-03-20 08:03 ` Re: pgsql: Set libpq sslcompression to off by default Daniel Gustafsson <daniel@yesql.se>
0 siblings, 1 reply; 8+ messages in thread
From: Tom Lane @ 2018-03-20 04:15 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: Daniel Gustafsson <daniel@yesql.se>; pgsql-committers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 3/17/18 15:12, Daniel Gustafsson wrote:
>> On 17 Mar 2018, at 17:47, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Buildfarm reports that SSL_clear_options isn't available everywhere.
>> Per some reading of the documentation and various patchers it seems
>> SSL_clear_options() was introduced in 0.9.8m and SSL_OP_NO_COMPRESSION in
>> 1.0.0.
> It seems the failure is limited to an old NetBSD version. They might
> have patched their libssl locally somehow. Is it worth supporting this?
Dunno, but the other side of the coin is that the goals of this patch
don't seem like a sufficient reason to break backwards compatibility
with any platform.
> We could add a configure test for SSL_clear_options().
Kind of annoying, but ...
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Set libpq sslcompression to off by default
2018-03-17 13:23 pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter_e@gmx.net>
2018-03-17 16:47 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
2018-03-17 19:12 ` Re: pgsql: Set libpq sslcompression to off by default Daniel Gustafsson <daniel@yesql.se>
2018-03-20 00:14 ` Re: pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-03-20 04:15 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-03-20 08:03 ` Daniel Gustafsson <daniel@yesql.se>
2018-03-20 21:00 ` Re: pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Gustafsson @ 2018-03-20 08:03 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-committers
> On 20 Mar 2018, at 05:15, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> On 3/17/18 15:12, Daniel Gustafsson wrote:
>>> On 17 Mar 2018, at 17:47, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> Buildfarm reports that SSL_clear_options isn't available everywhere.
>
>>> Per some reading of the documentation and various patchers it seems
>>> SSL_clear_options() was introduced in 0.9.8m and SSL_OP_NO_COMPRESSION in
>>> 1.0.0.
>
>> It seems the failure is limited to an old NetBSD version. They might
>> have patched their libssl locally somehow. Is it worth supporting this?
>
> Dunno, but the other side of the coin is that the goals of this patch
> don't seem like a sufficient reason to break backwards compatibility
> with any platform.
If we test for SSL_clear_options(), and use the sk_SSL_COMP_zero() where not
available, we should be able to keep backwards compatibility with older OpenSSL
revisions even if the distros have patched them AFAICT. Unless you’re already
working on it I can take a stab at it.
cheers ./daniel
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Set libpq sslcompression to off by default
2018-03-17 13:23 pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter_e@gmx.net>
2018-03-17 16:47 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
2018-03-17 19:12 ` Re: pgsql: Set libpq sslcompression to off by default Daniel Gustafsson <daniel@yesql.se>
2018-03-20 00:14 ` Re: pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-03-20 04:15 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
2018-03-20 08:03 ` Re: pgsql: Set libpq sslcompression to off by default Daniel Gustafsson <daniel@yesql.se>
@ 2018-03-20 21:00 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-03-21 00:42 ` Re: pgsql: Set libpq sslcompression to off by default Daniel Gustafsson <daniel@yesql.se>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Eisentraut @ 2018-03-20 21:00 UTC (permalink / raw)
To: Daniel Gustafsson <daniel@yesql.se>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers
On 3/20/18 04:03, Daniel Gustafsson wrote:
> If we test for SSL_clear_options(), and use the sk_SSL_COMP_zero() where not
> available, we should be able to keep backwards compatibility with older OpenSSL
> revisions even if the distros have patched them AFAICT. Unless you’re already
> working on it I can take a stab at it.
I don't think we need to go out of our way to deal with such old
versions (> 8 years AFAICT), especially since we have no way to test it.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Set libpq sslcompression to off by default
2018-03-17 13:23 pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter_e@gmx.net>
2018-03-17 16:47 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
2018-03-17 19:12 ` Re: pgsql: Set libpq sslcompression to off by default Daniel Gustafsson <daniel@yesql.se>
2018-03-20 00:14 ` Re: pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-03-20 04:15 ` Re: pgsql: Set libpq sslcompression to off by default Tom Lane <tgl@sss.pgh.pa.us>
2018-03-20 08:03 ` Re: pgsql: Set libpq sslcompression to off by default Daniel Gustafsson <daniel@yesql.se>
2018-03-20 21:00 ` Re: pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2018-03-21 00:42 ` Daniel Gustafsson <daniel@yesql.se>
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Gustafsson @ 2018-03-21 00:42 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers
> On 20 Mar 2018, at 22:00, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
>
> On 3/20/18 04:03, Daniel Gustafsson wrote:
>> If we test for SSL_clear_options(), and use the sk_SSL_COMP_zero() where not
>> available, we should be able to keep backwards compatibility with older OpenSSL
>> revisions even if the distros have patched them AFAICT. Unless you’re already
>> working on it I can take a stab at it.
>
> I don't think we need to go out of our way to deal with such old
> versions (> 8 years AFAICT), especially since we have no way to test it.
Fair enough, makes sense.
cheers ./daniel
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2018-03-21 00:42 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-17 13:23 pgsql: Set libpq sslcompression to off by default Peter Eisentraut <peter_e@gmx.net>
2018-03-17 16:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-03-17 19:12 ` Daniel Gustafsson <daniel@yesql.se>
2018-03-20 00:14 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-03-20 04:15 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-03-20 08:03 ` Daniel Gustafsson <daniel@yesql.se>
2018-03-20 21:00 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-03-21 00:42 ` Daniel Gustafsson <daniel@yesql.se>
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