pgsql: Improve libpq's error reporting for SSL failures.

Started by Tom Lanealmost 15 years ago3 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Improve libpq's error reporting for SSL failures.

In many cases, pqsecure_read/pqsecure_write set up useful error messages,
which were then overwritten with useless ones by their callers. Fix this
by defining the responsibility to set an error message to be entirely that
of the lower-level function when using SSL.

Back-patch to 8.3; the code is too different in 8.2 to be worth the
trouble.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/fee476da952a1f02f7ccf6e233fb4824c2bf6af4

Modified Files
--------------
src/interfaces/libpq/fe-misc.c | 24 ++++++++++----
src/interfaces/libpq/fe-secure.c | 61 +++++++++++++++++++++++++++++++-------
2 files changed, 67 insertions(+), 18 deletions(-)

#2Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#1)
Re: pgsql: Improve libpq's error reporting for SSL failures.

On 07/24/2011 04:29 PM, Tom Lane wrote:

Improve libpq's error reporting for SSL failures.

In many cases, pqsecure_read/pqsecure_write set up useful error messages,
which were then overwritten with useless ones by their callers. Fix this
by defining the responsibility to set an error message to be entirely that
of the lower-level function when using SSL.

Looks like this has broken something, maybe builds done without openssl?
See buildfarm pitta.

cheers

andrew

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#2)
Re: pgsql: Improve libpq's error reporting for SSL failures.

Andrew Dunstan <andrew@dunslane.net> writes:

On 07/24/2011 04:29 PM, Tom Lane wrote:

Improve libpq's error reporting for SSL failures.

Looks like this has broken something, maybe builds done without openssl?
See buildfarm pitta.

Argh, sorry about that. Will fix.

regards, tom lane