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 1n50QN-0002xJ-7O for pgsql-general@arkaria.postgresql.org; Wed, 05 Jan 2022 07:09:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n50QM-0000j8-3Y for pgsql-general@arkaria.postgresql.org; Wed, 05 Jan 2022 07:09:30 +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 1n50QK-0000iy-DF for pgsql-general@lists.postgresql.org; Wed, 05 Jan 2022 07:09:29 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n50QD-00061H-1U for pgsql-general@lists.postgresql.org; Wed, 05 Jan 2022 07:09:27 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id CB4B05C015E; Wed, 5 Jan 2022 02:09:18 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 05 Jan 2022 02:09:18 -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=PGmSD8L4K1ExF8UCVBnDvzfpnag GHCifhUnQXCUYULs=; b=dtSulkyblVSAtymi1VOp/iga/D1LP7jbIE/Ez0KomE0 /kY/vk/APWFpZR++aeqe2axZOxMq+j4IAk4N6PsonrBYAvczHmlVg5TThqq4O3a3 z5wfzdNOGrGLs0SZwjz8iY9SrJJ3jKyNlP+y52KrNNydLSoWXghpD4B9YVY6aNZe Ygi+zGP1mFhv0W2s4gp9SchM6la55MtvBY+xOZUaWFaP1QkB8PAfIz19evz6tOYC InZiRqvB+2u6PE6hRT5DpoPa7cXsABPJHl4wk4cZUB/ZgL9WZ1TQJq3aJia644ot LGAyFhtmGr2rVcgvJEKNtcqj4UOEAaiiNqH7Q/70lNA== 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=PGmSD8 L4K1ExF8UCVBnDvzfpnagGHCifhUnQXCUYULs=; b=M0T9l5aa8b/iE2pkFzK2SO GTmvM34rL/7EyphUBlDpYuI94nWncm0l5CtSyn2ZMUCiRyu45JO5z6Y6vYQ7JQzk byoUJBv+AALRJawOK3Kpbs/b41T+qMcC2ZYJlecUPDmMwfjQ49ff9JSqMJYUq3Qi ukmmevaIVibx0cNi/B8+rxcyU8mki3k8huGso/gfAG+R1NOKm6SXO9kG5A1W/FZD jSlLVFvhomRt731V9PdqK6vlDtRlV79YAf4z9GtUteRBqYkPetWh33EOLx5GArQZ VMPs6+2kmmTpKYg2QsjjK0a/shM7FhPAkel26xVlSucWmvZEUI97J6vsfGIXgQ1Q == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudefgedguddttdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdefhedmnecujfgurhepff fhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhephfeuleejkefgkeeljedtffevtdduffeugfeileeigffhueeuleffffehtefftdev necuffhomhgrihhnpehfvgguohhrrghprhhojhgvtghtrdhorhhgnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhu ihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Jan 2022 02:09:16 -0500 (EST) Date: Wed, 5 Jan 2022 16:09:12 +0900 From: Michael Paquier To: Tom Lane Cc: Christoph Moench-Tegeder , Michael =?iso-8859-1?Q?M=FChlbeyer?= , "pgsql-general@lists.postgresql.org" Subject: Re: md5 issues Postgres14 on OL7 Message-ID: References: <89B7F072-5BBE-4C92-903E-D83E865D9367@trivadis.com> <4038656.1641318875@sss.pgh.pa.us> <4190764.1641362933@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Hi980Yng2oHMl25P" Content-Disposition: inline In-Reply-To: <4190764.1641362933@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Hi980Yng2oHMl25P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 05, 2022 at 01:08:53AM -0500, Tom Lane wrote: > I think it's very important that the error message in this case > mention "FIPS mode" explicitly. Otherwise, people will have no > idea that that's where the problem originates, and they'll be > frustrated and we'll get bug reports. (They may be frustrated > anyway, but it was their choice, or their corporate policy's > choice, to cut off their access to MD5. Not our place to dodge > that decision.) I am not completely sure how to detect that in 1.1.1 in the context of Fedora, and portability may become a tricky thing. FIPS_mode() and FIPS_mode_set() are legacy APIs that should not be used, and upstream just disables them in 1.1.1. [... digs a bit ...] Ugh. Fedora patches upstream's 1.1.1 to check and react on /proc/sys/crypto/fips_enabled. Their code is here, see particularly 0009-Add-Kernel-FIPS-mode-flag-support.patch: https://src.fedoraproject.org/rpms/openssl.git So that's why you are able to use it with 1.1.1. Well, we could do something similar to that, but in 3.0.0 things are done very differently: one has to set to alg_sect fips=yes with fips = fips_sect in the OpenSSL configuration to load the FIPS provider. Providing more error context is going to be hairy here.. In order to make things portable with 14 in cryptohash.c, we don't have any need to change the existing cryptohash APIs. We could just store in each implementation context a location to a static string, and add a new routine to extract it if there is an error, defaulting to OOM. -- Michael --Hi980Yng2oHMl25P Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmHVRBgACgkQnvQgOdby QH3rYQ/8DDof/T5uHymKNNdpDpBZh/eLFG35TzzkRd5Xbow74sFQdy3geLuVb0jM 47Fqcl5a1heCQmIqKjoccs6+E6pwc6FZgUayO2dJe48dRzyjhcYGWJbDoy/UxII0 36brYkrHuZjWa8xQ+v2Ybd29iAcC4Rbl1obizE+7CGuY3Dc/hj3qm9QXxU2rVhnj ptRvyf4PZxLsNxIjMsSG2wbSv44MZoMFkZLIIVSS6Vq4SaErNwyeABwWf/RdO/s7 t3PMCXF0FDkHUgdF7KR8Nvqng0durOBFCOyCHLV4cTOZmZi58Nw7oYpmGFO6o2ml feRRWVX1qe+eIzzcK+cltZqMvmdt2tITIjsOqD27TDxOgJLpsPZBdNY6LG7bKGiU SiGd/cIsoRTy+2Jd3nTtNHoKlTTAsvA4vzoWjQ3Bq3P+fqYprxUkfkW4xqOS/bH9 6hp9ORzyfVuhGQUWo4IGSs2qr64KldlPuC8tgh+x++OTWlVdUq8DaHLWCVFUNZn+ VQhDs8762x/mScNq7eefZeGbVCF2dBN0TYSedkUBNuT11PVBUoi/stg2mxfKRiYn JaDc7gx7stF11UJ8KPPBGT/XrDY/Z3quQx4c3D1gtgoIdhUnxJxV/fuGfaw4E5v8 MjhSsuD14e+mwwgVwVM3XsBrLWqe25JH9yHWXXseCdhpDg1EwDY= =TLhb -----END PGP SIGNATURE----- --Hi980Yng2oHMl25P--