postgresql/src/backend
Heikki Linnakangas 593d4e47db Support OpenSSL 1.1.0.
Changes needed to build at all:

- Check for SSL_new in configure, now that SSL_library_init is a macro.
- Do not access struct members directly. This includes some new code in
  pgcrypto, to use the resource owner mechanism to ensure that we don't
  leak OpenSSL handles, now that we can't embed them in other structs
  anymore.
- RAND_SSLeay() -> RAND_OpenSSL()

Changes that were needed to silence deprecation warnings, but were not
strictly necessary:

- RAND_pseudo_bytes() -> RAND_bytes().
- SSL_library_init() and OpenSSL_config() -> OPENSSL_init_ssl()
- ASN1_STRING_data() -> ASN1_STRING_get0_data()
- DH_generate_parameters() -> DH_generate_parameters()
- Locking callbacks are not needed with OpenSSL 1.1.0 anymore. (Good
  riddance!)

Also change references to SSLEAY_VERSION_NUMBER with OPENSSL_VERSION_NUMBER,
for the sake of consistency. OPENSSL_VERSION_NUMBER has existed since time
immemorial.

Fix SSL test suite to work with OpenSSL 1.1.0. CA certificates must have
the "CA:true" basic constraint extension now, or OpenSSL will refuse them.
Regenerate the test certificates with that. The "openssl" binary, used to
generate the certificates, is also now more picky, and throws an error
if an X509 extension is specified in "req_extensions", but that section
is empty.

Backpatch to all supported branches, per popular demand. In back-branches,
we still support OpenSSL 0.9.7 and above. OpenSSL 0.9.6 should still work
too, but I didn't test it. In master, we only support 0.9.8 and above.

Patch by Andreas Karlsson, with additional changes by me.

Discussion: <20160627151604.GD1051@msg.df7cb.de>
2016-09-15 14:42:29 +03:00
..
access Have heapam.h include lockdefs.h rather than lock.h. 2016-09-13 09:21:35 -04:00
bootstrap Fix a bunch of places that called malloc and friends with no NULL check. 2016-08-30 18:22:43 -04:00
catalog Improve parser's and planner's handling of set-returning functions. 2016-09-13 13:54:24 -04:00
commands Be pickier about converting between Name and Datum. 2016-09-13 17:17:48 -04:00
executor Fix executor/README to reflect disallowing SRFs in UPDATE. 2016-09-13 14:25:35 -04:00
foreign Remove GetUserMappingId() and GetUserMappingById(). 2016-07-22 11:32:23 -04:00
lib Clarify the new Red-Black post-order traversal code a bit. 2016-09-04 15:02:06 +03:00
libpq Support OpenSSL 1.1.0. 2016-09-15 14:42:29 +03:00
main Repair a bit of pgindent damage. 2016-06-09 18:09:17 -04:00
nodes Improve parser's and planner's handling of set-returning functions. 2016-09-13 13:54:24 -04:00
optimizer Improve parser's and planner's handling of set-returning functions. 2016-09-13 13:54:24 -04:00
parser Improve parser's and planner's handling of set-returning functions. 2016-09-13 13:54:24 -04:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Fix a bunch of places that called malloc and friends with no NULL check. 2016-08-30 18:22:43 -04:00
postmaster Move code shared between libpq and backend from backend/libpq/ to common/. 2016-09-02 13:49:59 +03:00
regex Make locale-dependent regex character classes work for large char codes. 2016-09-05 17:06:29 -04:00
replication Identify walsenders in pg_stat_activity 2016-09-12 08:57:14 +01:00
rewrite Improve parser's and planner's handling of set-returning functions. 2016-09-13 13:54:24 -04:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Fix copy/pasto in file identification 2016-09-12 09:01:58 +01:00
tcop Add location field to DefElem 2016-09-06 12:00:00 -04:00
tsearch Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
utils Fix and clarify comments on replacement selection. 2016-09-15 11:51:43 +03:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Provide and use a makefile target to build all generated headers. 2016-07-01 15:09:02 -04:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00