Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cORHI-0005wF-Nr for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jan 2017 15:45:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cORHI-00012G-2f for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jan 2017 15:45:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cORHH-00010i-7z for pgsql-hackers@postgresql.org; Tue, 03 Jan 2017 15:45:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cORH1-0002EV-Dx for pgsql-hackers@postgresql.org; Tue, 03 Jan 2017 15:45:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v03Fj705023563; Tue, 3 Jan 2017 10:45:07 -0500 From: Tom Lane To: Peter Eisentraut cc: Michael Paquier , Andreas Karlsson , Michael Banck , Peter Geoghegan , PostgreSQL-development Subject: Re: [PATCH] Reload SSL certificates on SIGHUP In-reply-to: References: <28784.1440554271@sss.pgh.pa.us> <861d27e2-a642-2725-ae31-e375962ab700@proxel.se> <0927799d-9f32-7b40-4fe3-04a281365b7a@proxel.se> <2c1d1551-fd71-113f-7f45-f2379884bf85@proxel.se> <6d45be21-637b-c802-75e7-1ea634ed4089@proxel.se> <05677cd3-63b2-b15b-7afd-798e34e607c7@proxel.se> <16e282a4-2573-f629-09e8-e6b0ac615890@2ndquadrant.com> <29982.1483412575@sss.pgh.pa.us> Comments: In-reply-to Peter Eisentraut message dated "Tue, 03 Jan 2017 09:34:38 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23561.1483458307.1@sss.pgh.pa.us> Date: Tue, 03 Jan 2017 10:45:07 -0500 Message-ID: <23562.1483458307@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Peter Eisentraut writes: > On 1/2/17 10:02 PM, Tom Lane wrote: >> Before we leave this area, though, there is a loose end that requires >> more thought. That is, what about passphrase-protected server keys? > I don't have experience with this in practice, but my hunch would be > that you can continue to use passphrases as before, but the new reload > functionality is effectively not supported. That is, if you use > passphrases and make a key change, you need to do a full restart. Um, no, that's not the situation. Since we reload the SSL_CTX each time we get SIGHUP, and no information is carried forward from the old SSL_CTX, a passphrase-protected server key causes the postmaster to freeze at SIGHUP until somebody types a new passphrase on its /dev/tty. (I've just verified this: it stops accepting connections or indeed doing anything at all.) In the likely event that /dev/tty no longer opens successfully, it would report failure of the SSL reload and stop accepting new SSL connections. Even if you thought the previous behavior was useful, this completely isn't. If there were a way to carry forward the decrypted key from the old SSL_CTX to the new one, we could perhaps preserve the old behavior. But I don't know of one, and even if there is one, it's likely very OpenSSL-specific --- do we want to assume that every TLS implementation will support that? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers