Re: Support for NSS as a libpq TLS backend
Jacob Champion <pchampion@vmware.com>
From: Jacob Champion <pchampion@vmware.com>
To: "daniel@yesql.se" <daniel@yesql.se>
Cc: "hlinnaka@iki.fi" <hlinnaka@iki.fi>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "andrew.dunstan@2ndquadrant.com" <andrew.dunstan@2ndquadrant.com>, "michael@paquier.xyz" <michael@paquier.xyz>, "thomas.munro@gmail.com" <thomas.munro@gmail.com>, "andres@anarazel.de" <andres@anarazel.de>, "sfrost@snowman.net" <sfrost@snowman.net>
Date: 2021-02-02T20:33:35Z
Lists: pgsql-hackers
Attachments
- since-v24.diff (text/x-patch) patch v24
- v25-0001-NSS-Frontend-Backend-and-build-infrastructure.patch (text/x-patch) patch v25-0001
- v25-0002-NSS-Testharness-updates.patch (text/x-patch) patch v25-0002
- v25-0003-NSS-pg_strong_random-support.patch (text/x-patch) patch v25-0003
- v25-0004-NSS-Documentation.patch (text/x-patch) patch v25-0004
- v25-0005-NSS-contrib-modules.patch (text/x-patch) patch v25-0005
- v25-0006-NSS-cryptohash-support.patch (text/x-patch) patch v25-0006
On Tue, 2021-02-02 at 00:55 +0000, Jacob Champion wrote: > On Mon, 2021-02-01 at 21:49 +0100, Daniel Gustafsson wrote: > > > Embedded NULLs are now handled in a similar manner to the OpenSSL side, > > > though because this failure happens during the certificate > > > authentication callback, it results in a TLS alert rather than simply > > > closing the connection. > > > > But returning SECFailure from the cert callback force NSS to terminate the > > connection immediately doesn't it? > > IIRC NSS will send the alert first, whereas our OpenSSL implementation > will complete the handshake and then drop the connection. I'll rebuild > with the latest and confirm. I wasn't able to reproduce the behavior I thought I saw before. In any case I think the current NSS implementation for embedded NULLs will work correctly. > > Attached is a v24 which is > > rebased on top of todays --with-ssl commit, and now includes your changes. I have a v25 attached which fixes and re-enables the skipped/todo'd client certificate and SCRAM tests. (Changes between v24 and v25 are in since-v24.diff.) The server-cn-only database didn't have the root CA installed to be able to verify client certificates, so I've added it. Note that this changes the error message printed during the invalid- root tests, because NSS is now sending the root of the chain. So the server's issuer is considered untrusted rather than unrecognized. --Jacob
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