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 1mG9Vr-0003ze-QF for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Aug 2021 00:32:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mG9Vq-0006s6-Pl for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Aug 2021 00:32:58 +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 1mG9Vq-0006ry-IY for pgsql-hackers@lists.postgresql.org; Wed, 18 Aug 2021 00:32:58 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mG9Vl-000066-U0 for pgsql-hackers@lists.postgresql.org; Wed, 18 Aug 2021 00:32:58 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A383B5C018D; Tue, 17 Aug 2021 20:32:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 17 Aug 2021 20:32:51 -0400 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=fm2; bh=m+Ok9uTB6MZA1MSPkU/5xFH/DwD Dyg+yagdHnXkmSmw=; b=Uq8yxKyaADfq2wQAwCSJnweCMTFLB0UtnL8UQhxtaE2 LGbbgJnAVo+uhPL0dFOhHer9xG88pjWw2yR8SEQkwq5u5VNH1G4YR+/1CekDdqxm wXb8jvxWyJIdAgG2fKd7ndOa+NvzPznPayyWGJLQV/x2aN87y2U4aAaKQOt2SkKn KprSvZehsOWN0FH6bQwBZrxn5cDOQAZEG1lOjMLBwKZ3ngW5KrnPzARVyKTRoLby Cn+uAdH/Kx6uNY7IzU33rZsvdHxqx3YENqj0VVDVHV200ki6yREuELsmByIIkXxI DWZZLlIfsmDoWoh+wNilYomWIrxo6iwo2gN1sCPtZWw== 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=fm3; bh=m+Ok9u TB6MZA1MSPkU/5xFH/DwDDyg+yagdHnXkmSmw=; b=k6rSm9bJuZ8M5/CEu+ji7U 9mcuatej0qoAuhFHndFmsO5S+HCQgr1XsjwRnoySKVBVkyKecFCOo3FnYMKpTRas OlILdZiz/SbL/3Dt8ZkN3//V4OyvqH9GlGqxnMQDF6HLjomQwCTUeQJkPI+NwPh1 kDAlE52cEr9FTHqFDARyUU7NtPXoyjEOFDY5ERmMPrr5GzGHCQZ4tns6sKto4QoZ FEOb6/AULOKCVDpCnZRWp7JrHn2QKkq3/jkr70+XGbmUgXz4b5Uu1eWutqvIASuM hZJ9ku4N/j9PDylk+HJiSvEKvs0I86qL1bzI6hySv/hM/xSZ3Rt8fKJ5axaoHkZA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrleeggdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveejheeh ieevueeigeelteegleejleeiueeiheegvefhnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Aug 2021 20:32:45 -0400 (EDT) Date: Wed, 18 Aug 2021 09:32:37 +0900 From: Michael Paquier To: Jacob Champion Cc: "daniel@yesql.se" , "pgsql-hackers@lists.postgresql.org" , "hlinnaka@iki.fi" , "andrew.dunstan@2ndquadrant.com" , "andres@anarazel.de" , "thomas.munro@gmail.com" , "sfrost@snowman.net" Subject: Re: Support for NSS as a libpq TLS backend Message-ID: References: <8335133C-920E-438D-9CEB-DEF4C1533F73@yesql.se> <4ec146256e31afa0542f9fa970ec258c5f1a5f98.camel@vmware.com> <70A12E33-90B8-4761-8FA6-8DDB9EEA4D3E@yesql.se> <14b33300304507db6f4e4d8a77da105a8d18ea1a.camel@vmware.com> <02AB4044-0823-4F77-B69B-18DB378C8743@yesql.se> <33A9AFD6-7285-4064-9806-B08D7E61A88C@yesql.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IiFk7IkVJkH/MeQG" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --IiFk7IkVJkH/MeQG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 18, 2021 at 12:06:59AM +0000, Jacob Champion wrote: > I have a local test suite that I've been writing against libpq. With > the new ssldatabase connection option, one tricky aspect is figuring > out whether it's supported or not. It doesn't look like there's any way > to tell, from a client application, whether NSS or OpenSSL (or neither) > is in use. That's about guessing which library libpq is compiled with, so yes that's a problem. > so that you don't have to have an actual connection first in order to > figure out what connection options you need to supply. Clients that > support multiple libpq versions would need to know whether that call is > reliable (older versions of libpq will always return NULL, whether SSL > is compiled in or not), so maybe we could add a feature macro at the > same time? Still, the problem is wider than that, no? One cannot know either if a version of libpq is able to work with GSSAPI until they attempt a connection with gssencmode. It seems to me that we should work on the larger picture here. > We could also add a new API (say, PQsslLibrary()) but I don't know if > that gives us anything in practice. Thoughts? Knowing that the GSSAPI stuff is part of fe-secure.c, we may want instead a call that returns a list of supported secure libraries. -- Michael --IiFk7IkVJkH/MeQG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmEcVSUACgkQnvQgOdby QH3OwA//aV9yYEJ2gkGbQ5srVM0ryW4XJJJLsCE/9RTHyhl3E12XXvI9hUGQYE7h jbcVcUtPIdzYFXn49aWi/JACkouPfbI/8kFeYtzRjVNnDoR0sMjgWLTJuh9ivF2Q S70My+akPPRc0zToN8JC5+mN9Ft667qO4bY4x5FAuVTaTH1GXIcfV9iLF+4DisU5 xW9KFE7KktFSAimubzZaopzUJWFNE/7ojNH7wk08BLpXrdSopC7erInp2aejB1YX d7TPM54fXyg8rcGk6jRjcxlESu9I4DGXnfegYSb09Z6ql+S0w55akVcYuAdsq2pp +Zcrnvz0BMDqEx9RYU6ANiEFPBA8OyrNlWaX9QNhHf6hiAf1QtrpKS8EjzK+ADI9 F9PDrOvtLtPRWnmuUbZLS9ljNszoXNoE8/AJQdncv2+lbEw8I+3dwb7+W71uFyxg dKeGkhacLeSRkTU5KhYhg4LOnlC23KTSaYx4x7RQCZkihgGz7ebdWCDEWfeuxntI Yf+f1nKhXy/Gn2XkH7GIo8J0kyDMx3OY+Bd8Ljvfns24bENEFUbdfSSPZRrmZpLS qexVeRCK7XJ48oT28ssMNQW01GE3BaP7AXLFChrfWIpCiKKaTX1GxwyjL0RoVHM1 rU1XSf5JtsugyFpNWf3c/GG07eLbSxfBG2jzixAhOYznEpMS2Mk= =ppNN -----END PGP SIGNATURE----- --IiFk7IkVJkH/MeQG--