Re: Support for NSS as a libpq TLS backend
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Jacob Champion <pchampion@vmware.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>,
Andres Freund <andres@anarazel.de>,
Postgres hackers <pgsql-hackers@lists.postgresql.org>,
Michael Paquier <michael@paquier.xyz>,
Andrew Dunstan <andrew.dunstan@2ndquadrant.com>,
Stephen Frost <sfrost@snowman.net>,
Thomas Munro <thomas.munro@gmail.com>
Date: 2021-01-19T20:23:50Z
Lists: pgsql-hackers
> On 4 Dec 2020, at 01:57, Jacob Champion <pchampion@vmware.com> wrote: > > On Nov 17, 2020, at 7:00 AM, Daniel Gustafsson <daniel@yesql.se> wrote: >> >> Nice, thanks for the fix! I've incorporated your patch into the attached v20 >> which also fixes client side error reporting to be more readable. > > I was testing handshake failure modes and noticed that some FATAL > messages are being sent through to the client in cleartext. The OpenSSL > implementation doesn't do this, because it logs handshake problems at > COMMERROR level. Should we switch all those ereport() calls in the NSS > be_tls_open_server() to COMMERROR as well (and return explicitly), to > avoid this? Or was there a reason for logging at FATAL/ERROR level? The ERROR logging made early development easier but then stuck around, I've changed them to COMMERROR returning an error instead in the v21 patch just sent to the list. > Related note, at the end of be_tls_open_server(): > >> ... >> port->ssl_in_use = true; >> return 0; >> >> error: >> return 1; >> } > > This needs to return -1 in the error case; the only caller of > secure_open_server() does a direct `result == -1` comparison rather than > checking `result != 0`. Fixed. cheers ./daniel
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