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 1msA9Z-0002jH-0C for pgsql-committers@arkaria.postgresql.org; Tue, 30 Nov 2021 20:55:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1msA9X-0007jv-TJ for pgsql-committers@arkaria.postgresql.org; Tue, 30 Nov 2021 20:55:03 +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 1msA9X-0007jm-Lt for pgsql-committers@lists.postgresql.org; Tue, 30 Nov 2021 20:55:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msA9V-00023I-AG for pgsql-committers@lists.postgresql.org; Tue, 30 Nov 2021 20:55:02 +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 1AUKt09t1632479; Tue, 30 Nov 2021 15:55:00 -0500 From: Tom Lane To: Daniel Gustafsson cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Add TAP tests for contrib/sslinfo In-reply-to: References: <058AAA2B-06CA-4D1C-8D24-B9EA6632C072@yesql.se> Comments: In-reply-to Daniel Gustafsson message dated "Tue, 30 Nov 2021 17:58:05 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1632477.1638305700.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 30 Nov 2021 15:55:00 -0500 Message-ID: <1632478.1638305700@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson writes: > Scratch that, all the copying for tests 001 through 003 had failed. I c= learly > need another coffee. > The question still stands though, does anyone have any ideas on what cou= ld've > happened as I'm currently drawing a blank? Dunno, but it strikes me that the libpq code issuing this error is not up to our usual quality standards. It's just assuming that the stat() failure is ENOENT, and I have a sneaking suspicion that that's not so. I'm inclined to suggest that we start by changing that code to look like, say, if (stat(fnbuf, &buf) !=3D 0) { if (errno =3D=3D ENOENT) appendPQExpBuffer(&conn->errorMessage, libpq_gettext("certificate present, but = not private key file \"%s\"\n"), fnbuf); else appendPQExpBuffer(&conn->errorMessage, libpq_gettext("could not stat private ke= y file \"%s\": %m\n"), fnbuf); return -1; } and see what we learn. regards, tom lane