From 680513ab79c7e12e402a2aad7921b95a25a4bcc8 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Mon, 11 Aug 2014 11:54:19 +0300 Subject: Break out OpenSSL-specific code to separate files. This refactoring is in preparation for adding support for other SSL implementations, with no user-visible effects. There are now two #defines, USE_OPENSSL which is defined when building with OpenSSL, and USE_SSL which is defined when building with any SSL implementation. Currently, OpenSSL is the only implementation so the two #defines go together, but USE_SSL is supposed to be used for implementation-independent code. The libpq SSL code is changed to use a custom BIO, which does all the raw I/O, like we've been doing in the backend for a long time. That makes it possible to use MSG_NOSIGNAL to block SIGPIPE when using SSL, which avoids a couple of syscall for each send(). Probably doesn't make much performance difference in practice - the SSL encryption is expensive enough to mask the effect - but it was a natural result of this refactoring. Based on a patch by Martijn van Oosterhout from 2006. Briefly reviewed by Alvaro Herrera, Andreas Karlsson, Jeff Janes. --- src/include/pg_config.h.win32 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/include/pg_config.h.win32') diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index f7c2419252..00be15f230 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -628,15 +628,15 @@ /* Define to select named POSIX semaphores. */ /* #undef USE_NAMED_POSIX_SEMAPHORES */ +/* Define to build with OpenSSL support. (--with-openssl) */ +/* #undef USE_OPENSSL */ + /* Define to 1 to build with PAM support. (--with-pam) */ /* #undef USE_PAM */ /* Use replacement snprintf() functions. */ #define USE_REPL_SNPRINTF 1 -/* Define to build with (Open)SSL support. (--with-openssl) */ -/* #undef USE_SSL */ - /* Define to select SysV-style semaphores. */ /* #undef USE_SYSV_SEMAPHORES */ -- cgit v1.2.1