Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keg51-0004iN-DA for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Nov 2020 15:06:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1keg50-0005Rb-C6 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Nov 2020 15:06:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keg50-0005RT-5X for pgsql-hackers@lists.postgresql.org; Mon, 16 Nov 2020 15:06:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keg4y-0007ld-1a for pgsql-hackers@lists.postgresql.org; Mon, 16 Nov 2020 15:06:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0AGF604Y757057; Mon, 16 Nov 2020 10:06:00 -0500 From: Tom Lane To: Magnus Hagander cc: Daniel Gustafsson , Michael Paquier , Postgres hackers Subject: Re: Move OpenSSL random under USE_OPENSSL_RANDOM In-reply-to: References: <20201105034413.GE1632@paquier.xyz> <20201105121253.GA17513@paquier.xyz> <7001EB35-BF76-4DEA-A7AB-CA94BCAA64E3@yesql.se> <20201105122834.GB17513@paquier.xyz> <8D9C19AD-674D-4FD2-820E-9B429053719E@yesql.se> <20201105233632.GA21123@paquier.xyz> <53D01523-A458-4FC6-83F1-8A16266F54A0@yesql.se> <632623.1605460616@sss.pgh.pa.us> <20201116002016.GA2656@paquier.xyz> <9C83EC17-2D70-4449-A7C0-FE090D38AE5A@yesql.se> Comments: In-reply-to Magnus Hagander message dated "Mon, 16 Nov 2020 10:45:06 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <757055.1605539160.1@sss.pgh.pa.us> Date: Mon, 16 Nov 2020 10:06:00 -0500 Message-ID: <757056.1605539160@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Magnus Hagander writes: > I agree with those -- either we remove the ability to choose random source > independently of the SSL library (and then only use the windows crypto > provider or /dev/urandom as platform-specific choices when *no* SSL library > is used), and in that case we should not have separate #ifdef's for them. > Or we fix the includes. Which is obviously easier, but we should take the > time to do what we think is right long-term of course. FWIW, I'd vote for the former. I think the presumption that OpenSSL's random-number machinery can be used without any other initialization is shaky as heck. regards, tom lane