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 1kZtey-00017t-Ci for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Nov 2020 10:35:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kZtex-0003c7-53 for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Nov 2020 10:35:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZtew-0003c0-Oo for pgsql-hackers@lists.postgresql.org; Tue, 03 Nov 2020 10:35:26 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZteu-0000I6-KJ for pgsql-hackers@lists.postgresql.org; Tue, 03 Nov 2020 10:35:25 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 168EDB8C; Tue, 3 Nov 2020 05:35:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 03 Nov 2020 05:35:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=s2URHes6BdXffZowXM+gL5y1z29 aGKDxyYKY/4F5O9g=; b=qrM/y+mnBw3qMLA6jpCzXAt96+DYv6adYLSPDT/gxxd 1XL+5UvkGLmBMCmaj06WYvF89989RfM62px5/oGGb4p0Dar4fQHuiArzdgS2/D+V D6Cr25QIe1QRi3sHonP8GheH1h2Z0Y66RyiiqCL6IcvN8rT5msL/XhG94Mk7T+AY 9qGeWiZ5TdHoeOYNK6fkn6kSDBxbnvz1/JgIoC4FWTBf/w7jpi2wh8SdSEKdTL1S MszcNjd18/HP5Qo790tHYy1liP65k4kGc0S3W63iOMOHayC5O5s0p3mOiwqG+HWd 9YtRvM7XgSXTSEm0N2ZsUwT8dfq3ux+XYvNzaFvHZ9w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=s2URHe s6BdXffZowXM+gL5y1z29aGKDxyYKY/4F5O9g=; b=DsK6pr/h76tSIZ7kW4YHXz Nc+mn4MypEwLiwihDp2LRomqIBwAcBf1GRYTl4JFsc1rDEzf41uFYnmmDsdA+b7m JTBfIo2Tg1WJc+N1wO3cBgRRgsjpZR8Nr/7lUensRwH4WBz8AQHx+e/3e/YsVMvH Jpwap/TZQhX8CBMIn2ggVNNahS12Y9S7BHiNvXU1pSp4lVJVv4B4G2soGpQJFM9B yKOizv52O6NK9ua7w6n4E8a7hqVROU7C+sS6uK2T23GLvpNdjpcko5xO/EZIIFkX 1NxEkQgLr8jFEplXPmH2oVwVZGsPW7tQXBUxxv4MzjZpKAZvcr2qsQT47ljgXlDQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtfedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id E50803280066; Tue, 3 Nov 2020 05:35:20 -0500 (EST) Date: Tue, 3 Nov 2020 19:35:18 +0900 From: Michael Paquier To: Magnus Hagander Cc: Daniel Gustafsson , Postgres hackers Subject: Re: Move OpenSSL random under USE_OPENSSL_RANDOM Message-ID: <20201103103518.GC2298@paquier.xyz> References: <20200826075659.GI2017@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Y5rl02BVI9TCfPar" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Y5rl02BVI9TCfPar Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 03, 2020 at 10:15:48AM +0100, Magnus Hagander wrote: > On Wed, Aug 26, 2020 at 2:19 PM Daniel Gustafsson wrote: >> That's certainly true. The intention though is to make the code easier = to >> follow (more explicit/discoverable) for anyone trying to implement suppo= rt for >=20 > Is it really a reasonable usecase to use RAND_bytes() outside of both > pg_stroing_random() *and' outside of the openssl-specific files (like > be-secure-openssl.c)? Because it would only be those cases that would > have this case, right? It does not sound that strange to me to assume if some out-of-core code makes use of that to fetch a random set of bytes. Now I don't know of any code doing that. Who knows. > If anything, perhaps the call to RAND_poll() in fork_process.c should > actually be a call to a strong_random_initialize() or something which > would have an implementation in pg_strong_random.c, thereby isolating > the openssl specific code in there? (And with a void implementation > without openssl) I don't think that we have any need to go to such extent just for this case, as RAND_poll() after forking a process is irrelevant in 1.1.1. We are still many years away from removing its support though. No idea if other SSL implementations would require such a thing. Daniel, what about NSS? -- Michael --Y5rl02BVI9TCfPar Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl+hMmYACgkQnvQgOdby QH20hA//WnC7vXgcjzglTkdbIm+7QIm0eoTcxdt5fKwQsiYboD0eUla5wSblb9GA 3XXhl4ruGsBWFlcUWWU4h6mTBtjm93+e/eldCgzCdxtyHwqmQoEccPDMsbV/U9PA fzRETRrRJpENdkWWd/GzuppN9NRh+3ftXtKkG6aOf/cQ9CgJbU7a/TJIJiMAf5+z qd41UiwmBn9Q6rmsQRXsyyujTUOa+Fp9AXXZLgLpIE8euJvFAx2UDt+J2jR3uPqF wT+VdMazcytNpQP0nJD4sAj4NGSPeGnfIVAB45BfqTOeptMKXOHMccMpkoclXZag E2h7HuVdquFnEaTpIzTY0+iOhzRxZK/Wo7ms/49UOZAqr0ZBqGDWWLBZD5Yx/9tm /Okaw7WStyoZgWpueNOQuaSI6QfQKSozpDDI9IXLTYbltluekDkS5wEYrK5Lgclq Ff47iJ2KhZr0x3ih6zpdrr2cu+SwrrYtP/Cs2VMBkLZNgKeihw7F65sMm5a14BcL SPPhqCyC4TFu3+xX0flIBxHjtK0ul6+02IUdH5HP0qpTVvYI8y5oT1cWDwWg6cyg ffdm35Q8R7VQBsyKxN4/IsHkmnftEWFesrVIjahGWJF2Xd5TqsDyb+GZm+CL9FaR eCmucKR+OleYYM4HyyN2zUKxwGlV6kQktQhjCpB5qEZN8V6q1oA= =nyFt -----END PGP SIGNATURE----- --Y5rl02BVI9TCfPar--