Re: Support for NSS as a libpq TLS backend
Stephen Frost <sfrost@snowman.net>
From: Stephen Frost <sfrost@snowman.net>
To: Jacob Champion <pchampion@vmware.com>
Cc: "michael@paquier.xyz" <michael@paquier.xyz>, "daniel@yesql.se" <daniel@yesql.se>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "hlinnaka@iki.fi" <hlinnaka@iki.fi>, "andrew.dunstan@2ndquadrant.com" <andrew.dunstan@2ndquadrant.com>, "thomas.munro@gmail.com" <thomas.munro@gmail.com>, "andres@anarazel.de" <andres@anarazel.de>
Date: 2021-03-24T17:00:36Z
Lists: pgsql-hackers
Greetings Jacob, * Jacob Champion (pchampion@vmware.com) wrote: > On Wed, 2021-03-24 at 09:28 +0900, Michael Paquier wrote: > > On Wed, Mar 24, 2021 at 12:05:35AM +0000, Jacob Champion wrote: > > > I can work around it temporarily for the > > > tests, but this will be a problem if any libpq clients load up multiple > > > independent databases for use with separate connections. Anyone know if > > > this is a supported use case for NSS? > > > > Are you referring to the case of threading here? This should be a > > supported case, as threads created by an application through libpq > > could perfectly use completely different connection strings. > Right, but to clarify -- I was asking if *NSS* supports loading and > using separate certificate databases as part of its API. It seems like > the internals make it possible, but I don't see the public interfaces > to actually use those internals. Yes, this is done using SECMOD_OpenUserDB, see: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/PKCS11_Functions#SECMOD_OpenUserDB also there's info here: https://groups.google.com/g/mozilla.dev.tech.crypto/c/Xz6Emfcue0E We should document that, as mentioned in the link above, the NSS find functions will find certs in all the opened databases. As this would all be under one application which is linked against libpq and passing in different values for ssl_database for different connections, this doesn't seem like it's really that much of an issue. Thanks! Stephen
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