From: Heikki Linnakangas <hlinnaka@iki.fi>
To: David Gould <daveg@sonic.net>
Cc: Zuk, Kacper <kzuk@akamai.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14329: libpq doesn't send complete client certificate chain on first SSL connection
Date: Wed, 5 Oct 2016 09:20:38 +0300
Message-ID: <9859e5ae-d1fa-948a-c73e-6a7e3ccb5ccb@iki.fi> (raw)
In-Reply-To: <11707_1475610841_57F408D9_11707_4254_1_20161004125328.0a2311c2@engels>
References: <20160920101051.1355.79453@wrigleys.postgresql.org>
<c2315357-00b1-5141-c06c-8fca91736027@iki.fi>
<F44EA122-A55B-41C1-B85C-826CFEE5D28B@akamai.com>
<e9315ff0-1252-c4f5-5669-acbcfcabd059@iki.fi>
<11707_1475610841_57F408D9_11707_4254_1_20161004125328.0a2311c2@engels>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 10/04/2016 10:53 PM, David Gould wrote:
> On Tue, 4 Oct 2016 21:55:52 +0300
> Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>
>> I'm starting to feel that using the same SSL_CTX object for multiple
>> connections is just too fragile. Perhaps we could share one SSL_CTX
>> object for all the connections with no sslcert and no sslrootcert, but
>> I'm not sure if even that is worth it.
>>
>> In quick testing, calling SSL_CTX_new() for each connection adds about
>> 3% of overhead to establishing a new connection, with the default
>> OpenSSL settings (seems to use ECDHE-RSA-AES256-GCM-SHA384 cipher here).
>> I also tested memory usage with a program that opens 10000 connections,
>> and it used about 15% more memory, when SSL_CTX_new() is called for each
>> connection. I think that's acceptable. Barring objections, I'm going to
>> write a patch to use a separate SSL context for every connection.
>
> What about keeping a table of connection strings and SSL contexts so that all
> connections using the same connection string could share the SSL context? It
> seems likely that most applications reuse the same connection string and
> could avoid the penalty.
Yeah, could do that. Then again, I don't think it's worth the trouble.
- Heikki
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: hlinnaka@iki.fi, daveg@sonic.net, kzuk@akamai.com
Subject: Re: BUG #14329: libpq doesn't send complete client certificate chain on first SSL connection
In-Reply-To: <9859e5ae-d1fa-948a-c73e-6a7e3ccb5ccb@iki.fi>
References: <20160920101051.1355.79453@wrigleys.postgresql.org> <c2315357-00b1-5141-c06c-8fca91736027@iki.fi> <F44EA122-A55B-41C1-B85C-826CFEE5D28B@akamai.com> <e9315ff0-1252-c4f5-5669-acbcfcabd059@iki.fi> <11707_1475610841_57F408D9_11707_4254_1_20161004125328.0a2311c2@engels> <9859e5ae-d1fa-948a-c73e-6a7e3ccb5ccb@iki.fi>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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