Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brfZO-0003g5-88 for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Oct 2016 06:20:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1brfZN-00041e-R6 for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Oct 2016 06:20:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1brfZN-00041Y-Ed for pgsql-bugs@postgresql.org; Wed, 05 Oct 2016 06:20:45 +0000 Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1brfZK-0008IO-8N for pgsql-bugs@postgresql.org; Wed, 05 Oct 2016 06:20:44 +0000 Received: by mail-lf0-x22f.google.com with SMTP id b75so69108461lfg.3 for ; Tue, 04 Oct 2016 23:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=qMLgotisrbznWrB+ClRXSuSyvTR/4KI89MfIzBwoIP4=; b=SH5Sp3+XNdgv0/MtA7W8tfyFqBdlwNBGe5xf7US0Rq3hVSsG8Rknw9IGgCBKWUPJOu GHvCwNCrZrmaYhRlK1gC7Ctt0wd/0L58w9dmZktTOghGUoqL+zuC9COhHEohd4/SfztR O8w3z2Zt1O8coYVpr6DGfm6sa/zCyQz9IU0cf7EPdfUhl3Lw1qirus0x+tKHY9whCOLL IRavGmjMQFjIRqLTETPaIjUG3M87RK74shZW72BN9FHRgL005aKRAqeMyfb3h88r/ADk zrg0YrIAETuB6niWaGFeEghTYfA+5c+9yIm6GgbThjAtXYX2oNn/ENyajI0ZwzehJDWm lkcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=qMLgotisrbznWrB+ClRXSuSyvTR/4KI89MfIzBwoIP4=; b=XnWPJFCv4H39/Vu5MOQnqWoH/m2Nl0o9WYGafI1lNPPF9y4MSPXyahtlnQj0uatry9 F3CFB9SE1x5K0iuLXVctjD7KuOP1bQHZQgDGIETgl7VgHqkGshSAxu86I9Snm0Su2C2T DsPvvFRrFUl5LEG7qoLHi8x7Hpx14eog1GmlzxkFNglfidfBa3WdY3mrwsLSuAxm1Mk6 opInMJHxDGaxdkwxpr0EWjBq0wd91x8qkFMtLq4g7o4IzTxi8Px46honkanA2cMknuKl IDgvfgr/+ptklFFfSF43j2Ou22oYuh351LO/42/5O1qySHSeSQdNd2t/EtGD/Gn4W1wO 5K6A== X-Gm-Message-State: AA6/9Rnbn73K3I5lD53fzevvflnokYVjbqpl0KhKJVF5/mSVYbkiOmJUmVFD12HgqSfEDQ== X-Received: by 10.25.23.228 with SMTP id 97mr3206434lfx.123.1475648440180; Tue, 04 Oct 2016 23:20:40 -0700 (PDT) Received: from [192.168.1.111] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by smtp.gmail.com with ESMTPSA id 125sm1373657ljj.8.2016.10.04.23.20.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Oct 2016 23:20:39 -0700 (PDT) Subject: Re: BUG #14329: libpq doesn't send complete client certificate chain on first SSL connection To: David Gould References: <20160920101051.1355.79453@wrigleys.postgresql.org> <11707_1475610841_57F408D9_11707_4254_1_20161004125328.0a2311c2@engels> Cc: "Zuk, Kacper" , "pgsql-bugs@postgresql.org" From: Heikki Linnakangas Message-ID: <9859e5ae-d1fa-948a-c73e-6a7e3ccb5ccb@iki.fi> Date: Wed, 5 Oct 2016 09:20:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 In-Reply-To: <11707_1475610841_57F408D9_11707_4254_1_20161004125328.0a2311c2@engels> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 10/04/2016 10:53 PM, David Gould wrote: > On Tue, 4 Oct 2016 21:55:52 +0300 > Heikki Linnakangas 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