postgresql/src/interfaces/libpq
Stephen Frost 55754380f3 Add locking around SSL_context usage in libpq
I've been working with Nick Phillips on an issue he ran into when
trying to use threads with SSL client certificates.  As it turns out,
the call in initialize_SSL() to SSL_CTX_use_certificate_chain_file()
will modify our SSL_context without any protection from other threads
also calling that function or being at some other point and trying to
read from SSL_context.

To protect against this, I've written up the attached (based on an
initial patch from Nick and much subsequent discussion) which puts
locks around SSL_CTX_use_certificate_chain_file() and all of the other
users of SSL_context which weren't already protected.

Nick Phillips, much reworked by Stephen Frost

Back-patch to 9.0 where we started loading the cert directly instead of
using a callback.
2013-08-01 01:23:49 -04:00
..
po Translation updates 2013-05-05 22:34:23 -04:00
test Fix PQconninfoParse error message handling 2013-07-15 20:08:41 -04:00
.gitignore Re-include pqsignal() in libpq. 2013-03-17 15:45:31 -04:00
bcc32.mak Re-include pqsignal() in libpq. 2013-03-17 15:45:31 -04:00
exports.txt Add libpq function PQconninfo() 2012-11-30 15:11:08 +09:00
fe-auth.c pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
fe-auth.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
fe-connect.c Expect EWOULDBLOCK from a non-blocking connect() call only on Windows. 2013-06-27 12:37:01 -04:00
fe-exec.c Additional spelling corrections 2013-06-03 08:40:27 -04:00
fe-lobj.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
fe-misc.c Move pqsignal() to libpgport. 2013-03-17 12:06:42 -04:00
fe-print.c pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
fe-protocol2.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
fe-protocol3.c pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
fe-secure.c Add locking around SSL_context usage in libpq 2013-08-01 01:23:49 -04:00
libpq-events.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
libpq-events.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
libpq-fe.h pg_isready 2013-01-23 11:01:20 -05:00
libpq-int.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
libpq.rc.in Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Re-include pqsignal() in libpq. 2013-03-17 15:45:31 -04:00
nls.mk Translation updates 2013-05-05 22:34:23 -04:00
pg_service.conf.sample Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
pqexpbuffer.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pqexpbuffer.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pthread-win32.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
README Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
win32.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
win32.h Enable compiling with the mingw-w64 32 bit compiler. 2011-12-10 15:35:41 -05:00
win32.mak Re-include pqsignal() in libpq. 2013-03-17 15:45:31 -04:00

src/interfaces/libpq/README

This directory contains the C version of Libpq, the POSTGRES frontend library.