Improve libpq's error reporting for SSL failures.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f9d466e53036b9bb4e075ebde754b90008cf80b2
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2011-07-24T20:29:13Z
Releases: 9.1.0
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.

Files

PathChange+/−
src/interfaces/libpq/fe-misc.c modified +17 −7
src/interfaces/libpq/fe-secure.c modified +50 −11