Re: Support for NSS as a libpq TLS backend
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Joshua Brindle <joshua.brindle@crunchydata.com>
Cc: Kevin Burke <kevin@burke.dev>,
Jacob Champion <pchampion@vmware.com>,
"pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>,
"hlinnaka@iki.fi" <hlinnaka@iki.fi>,
"andrew.dunstan@2ndquadrant.com" <andrew.dunstan@2ndquadrant.com>,
"sfrost@snowman.net" <sfrost@snowman.net>,
"rachelmheaton@gmail.com" <rachelmheaton@gmail.com>,
"thomas.munro@gmail.com" <thomas.munro@gmail.com>,
"michael@paquier.xyz" <michael@paquier.xyz>,
"andres@anarazel.de" <andres@anarazel.de>
Date: 2021-11-23T14:12:45Z
Lists: pgsql-hackers
Attachments
- v49-0001-nss-Support-libnss-as-TLS-library-in-libpq.patch (application/octet-stream) patch v49-0001
- v49-0002-Refactor-SSL-testharness-for-multiple-library.patch (application/octet-stream) patch v49-0002
- v49-0003-nss-Add-NSS-specific-tests.patch (application/octet-stream) patch v49-0003
- v49-0004-test-check-for-empty-stderr-during-connect_ok.patch (application/octet-stream) patch v49-0004
- v49-0005-nss-pg_strong_random-support.patch (application/octet-stream) patch v49-0005
- v49-0006-nss-Documentation.patch (application/octet-stream) patch v49-0006
- v49-0007-nss-Support-NSS-in-pgcrypto.patch (application/octet-stream) patch v49-0007
- v49-0008-nss-Support-NSS-in-sslinfo.patch (application/octet-stream) patch v49-0008
- v49-0009-nss-Support-NSS-in-cryptohash.patch (application/octet-stream) patch v49-0009
- v49-0010-nss-Build-infrastructure.patch (application/octet-stream) patch v49-0010
> On 17 Nov 2021, at 19:42, Joshua Brindle <joshua.brindle@crunchydata.com> wrote: > On Tue, Nov 16, 2021 at 1:26 PM Joshua Brindle > <joshua.brindle@crunchydata.com> wrote: >> I think there it a typo in the docs here that prevents them from >> building (this diff seems to fix it): Ah yes, thanks, I had noticed that one but forgot to send out a new version to make the CFBot green. > After a bit more testing, the server is up and running with an nss > database but before configuring the client database I tried connecting > and got a segfault: Interesting. I'm unable to reproduce this crash, can you show the sequence of commands which led to this? > It looks like the ssl connection falls through to attempt a non-ssl > connection but at some point conn->ssl_in_use gets set to true, > despite pr_fd and nss_context being null. pgtls_close missed setting ssl_in_use to false, fixed in the attached. I've also added some assertions to the connection setup for debugging this. > This patch fixes the segfault but I suspect is not the correct fix, > due to the error when connecting saying "Success": Right, without an SSL enabled FD we should never get here. -- Daniel Gustafsson https://vmware.com/
Commits
-
Add tab-completion for CREATE FOREIGN TABLE.
- 74527c3e022d 15.0 cited
-
Add tap tests for the schema publications.
- 6b0f6f79eef2 15.0 cited
-
Move Perl test modules to a better namespace
- b3b4d8e68ae8 15.0 cited
-
Adjust configure to insist on Perl version >= 5.8.3.
- 92e6a98c3636 15.0 cited
-
Simplify code related to compilation of SSL and OpenSSL
- 092b785fad3d 14.0 landed
-
Introduce --with-ssl={openssl} as a configure option
- fe61df7f82aa 14.0 landed
-
Implement support for bulk inserts in postgres_fdw
- b663a4136331 14.0 cited
-
Fix redundant error messages in client tools
- 6be725e70161 14.0 cited
-
doc: Apply more consistently <productname> markup for OpenSSL
- 089da3c4778f 14.0 landed
-
Check ssl_in_use flag when reporting statistics
- 6a5c750f3f72 14.0 cited