postgresql/src/include
Alvaro Herrera 31cf1a1a43 Rework SSL renegotiation code
The existing renegotiation code was home for several bugs: it might
erroneously report that renegotiation had failed; it might try to
execute another renegotiation while the previous one was pending; it
failed to terminate the connection if the renegotiation never actually
took place; if a renegotiation was started, the byte count was reset,
even if the renegotiation wasn't completed (this isn't good from a
security perspective because it means continuing to use a session that
should be considered compromised due to volume of data transferred.)

The new code is structured to avoid these pitfalls: renegotiation is
started a little earlier than the limit has expired; the handshake
sequence is retried until it has actually returned successfully, and no
more than that, but if it fails too many times, the connection is
closed.  The byte count is reset only when the renegotiation has
succeeded, and if the renegotiation byte count limit expires, the
connection is terminated.

This commit only touches the master branch, because some of the changes
are controversial.  If everything goes well, a back-patch might be
considered.

Per discussion started by message
20130710212017.GB4941@eldon.alvh.no-ip.org
2013-10-10 23:45:20 -03:00
..
access Minor GIN code refactoring. 2013-10-03 11:51:31 +03:00
bootstrap Update copyrights for 2013 2013-01-01 17:15:01 -05:00
catalog Replace duplicate_oids with Perl implementation 2013-10-10 20:09:42 -04:00
commands Add DISCARD SEQUENCES command. 2013-10-03 16:23:31 -04:00
common pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
datatype Update copyrights for 2013 2013-01-01 17:15:01 -05:00
executor Prevent leakage of SPI tuple tables during subtransaction abort. 2013-07-25 16:46:14 -04:00
foreign Improve updatability checking for views and foreign tables. 2013-06-12 17:53:33 -04:00
lib Reset the binary heap in MergeAppend rescans. 2013-08-30 19:15:21 -04:00
libpq Rework SSL renegotiation code 2013-10-10 23:45:20 -03:00
mb Renovate display of non-ASCII messages on Windows. 2013-06-26 11:17:33 -04:00
nodes Add DISCARD SEQUENCES command. 2013-10-03 16:23:31 -04:00
optimizer Auto-tune effective_cache size to be 4x shared buffers 2013-10-08 12:12:24 -04:00
parser Allow aggregate functions to be VARIADIC. 2013-09-03 17:08:46 -04:00
port Unconditionally use the WSA equivalents of Socket error constants. 2013-08-20 14:11:36 -04:00
portability Allow dynamic allocation of shared memory segments. 2013-10-09 21:05:02 -04:00
postmaster Allow discovery of whether a dynamic background worker is running. 2013-08-28 14:08:13 -04:00
regex Support indexing of regular-expression searches in contrib/pg_trgm. 2013-04-09 01:06:54 -04:00
replication pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
rewrite Eliminate pg_rewrite.ev_attr column and related dead code. 2013-09-05 14:03:43 -05:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Allow dynamic allocation of shared memory segments. 2013-10-09 21:05:02 -04:00
tcop pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils json_typeof function. 2013-10-10 12:21:59 -04:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h TYPEALIGN doesn't work on int64 on 32-bit platforms. 2013-10-08 01:59:57 +03:00
fmgr.h Add infrastructure for storing a VARIADIC ANY function's VARIADIC flag. 2013-01-21 20:26:15 -05:00
funcapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getaddrinfo.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getopt_long.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
miscadmin.h Allow discovery of whether a dynamic background worker is running. 2013-08-28 14:08:13 -04:00
pg_config.h.in Allow dynamic allocation of shared memory segments. 2013-10-09 21:05:02 -04:00
pg_config.h.win32 Revert WAL posix_fallocate() patches. 2013-09-04 23:43:41 -07:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Keep heavily-contended fields in XLogCtlInsert on different cache lines. 2013-09-04 23:14:33 +03:00
pg_trace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgstat.h Split pgstat file in smaller pieces 2013-02-18 18:12:52 -03:00
pgtar.h Move tar function headers to pgtar.h 2013-01-02 20:34:08 +01:00
pgtime.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
port.h Renovate display of non-ASCII messages on Windows. 2013-06-26 11:17:33 -04:00
postgres.h Add comment for VARSIZE_ANY_EXHDR macro 2013-09-10 20:18:53 -04:00
postgres_ext.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
postgres_fe.h Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
rusagestub.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
windowapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00