Fix building with LibreSSL.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 15 Sep 2016 19:29:39 +0000 (22:29 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 15 Sep 2016 19:38:01 +0000 (22:38 +0300)
commit48e5ba61e6ad1773820794835132823a54d6aa8e
treefb3d33d662310b6f6ef9028b22ed11367a4496e0
parent60b6d99dac05b888b7f121720cafea88ba0c9307
Fix building with LibreSSL.

LibreSSL defines OPENSSL_VERSION_NUMBER to claim that it is version 2.0.0,
but it doesn't have the functions added in OpenSSL 1.1.0. Add autoconf
checks for the individual functions we need, and stop relying on
OPENSSL_VERSION_NUMBER.

Backport to 9.5 and 9.6, like the patch that broke this. In the
back-branches, there are still a few OPENSSL_VERSION_NUMBER checks left,
to check for OpenSSL 0.9.8 or 0.9.7. I left them as they were - LibreSSL
has all those functions, so they work as intended.

Per buildfarm member curculio.

Discussion: <2442.1473957669@sss.pgh.pa.us>
configure
configure.in
contrib/pgcrypto/openssl.c
src/backend/libpq/be-secure-openssl.c
src/include/pg_config.h.in
src/interfaces/libpq/fe-secure-openssl.c